You are not logged in.

#1 2009-08-20 12:46:44

Dinth
Member
From: London
Registered: 2009-03-02
Posts: 238

duneoncrawl-stonesoup

I m already building PKGBUILD for this wonderful game, but i have small question, because im a complete noob in making Arch packages. Is there any nice way to uncomment some lines in particular file ?

Offline

#2 2009-08-20 14:53:05

evr
Arch Linux f@h Team Member
Registered: 2009-01-23
Posts: 554

Re: duneoncrawl-stonesoup

Can you post an example of what you mean? i'm not quite sure what you're asking.  Are you trying to edit a config file or something of that nature?

Offline

#3 2009-08-20 15:47:43

Dinth
Member
From: London
Registered: 2009-03-02
Posts: 238

Re: duneoncrawl-stonesoup

Im tring to uncomment two lines in makefile.
I will post working PKGBUILD as soon as i make it smile

Offline

#4 2009-08-20 16:19:57

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: duneoncrawl-stonesoup

man (and google) "sed"

We could tell you the specific invocation you need, but this is a tool you must learn how to use.

Offline

#5 2009-08-20 19:57:08

Dinth
Member
From: London
Registered: 2009-03-02
Posts: 238

Re: duneoncrawl-stonesoup

I know _basics_ of sed and propably could do it, but im in fear of doing this publicly in not elegant way sad

Offline

#6 2009-08-20 22:29:30

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: duneoncrawl-stonesoup

Generally makefiles aren't edited and instead make options are done but can't really tell without seeing any details.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#7 2009-08-21 00:15:42

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: duneoncrawl-stonesoup

If PAT1,PAT2 are some patterns uniquely occuring in the lines you want to uncomment, then you can add something like this to your PKGBUILD

sed -r -e "s/^#(.*PAT1)/\1/; s/^#(.*PAT2)/\2/;" -i path/to/Makefile

That will modify the Makefile in place. Try it by hand first on a copy of the Makefile and diff the result with the original to see that you're making the changes you want and only those changes.

If instead PAT1 is a pattern uniquely occurring in the first line you want to uncomment, and the second line immediately follows that, then you can do

sed -r -e "/^#(.*PAT1)/ { s//\1/; n; s/^#//; }"

Offline

#8 2009-08-21 13:44:12

Dinth
Member
From: London
Registered: 2009-03-02
Posts: 238

Re: duneoncrawl-stonesoup

I've made already something like this:

# Contributor: Michal Gawronski <dinth@dinth.pl>
pkgname=dungeoncrawl-stonesoup
pkgver=0.5.1
pkgrel=1
pkgdesc="Dungeon Crawl Stone Soup is a variant of Linley's Dungeon Crawl roguelike game"
arch=('i686' 'x86_64')
url="http://crawl-ref.sourceforge.net"
license=('GPL')
groups=()
depends=('lua' 'ncurses')
makedepends=('flex' 'bison')
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
source=("http://downloads.sourceforge.net/project/crawl-ref/Stone Soup/$pkgver/stone_soup-$pkgver-src.tbz2")
noextract=()
md5sums=('e1feb17d161311825e5eb676c14be44a')

build() {
  cd "$srcdir/stone_soup-$pkgver-src/source"
  sed -r -e "/^#(.*SAVEDIR.*)/ { s//\1/; n; s/^#//; }" -i ./makefile.unix
  sed -e "s/\/usr\/games\/crawl/\/usr\/share\/dungeoncrawl-stonesoup/g" -i ./makefile.unix
  make || return 1
  make DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et:

But unfortunately this doesnt work.
I get error: "mkdir: nie można utworzyć katalogu `/usr/share/dungeoncrawl': Brak dostępu" [access is denied when tring to make dir.]

Offline

Board footer

Powered by FluxBB