You are not logged in.
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
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
Im tring to uncomment two lines in makefile.
I will post working PKGBUILD as soon as i make it ![]()
Offline
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
I know _basics_ of sed and propably could do it, but im in fear of doing this publicly in not elegant way ![]()
Offline
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
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/MakefileThat 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
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