You are not logged in.
I made a PKGBUILD which installs fine. However, the package in question creates some extra files in /usr/share/*package*, which are not tracked by pacman. Is it possible to automatically remove these files should I ever uninstall the package?
Last edited by supulton (2010-04-11 08:53:12)
Offline
Your app should not create any files under /usr/share when it's running. /usr/share is for read-only static data - only pacman should add or remove files there during package management operations.
Offline
Where should I put it then? The package in question, by the way, is the game Crawl (stone soup). The only non-static files it creates are saves, which can be moved easily, but where is a common location for such things?
Here's the PKGBUILD by the way:
pkgname=stone-soup-tile
pkgver=0.6.0
pkgrel=1
pkgdesc="Community maintained variant of Linley's Dungeon Crawl (tile + ascii)"
arch=('i686' 'x86_64' 'ppc')
url="http://crawl.develz.org/"
depends=('lua' 'libpng' 'libx11' 'ncurses' 'sdl_image')
makedepends=('gcc' 'bison' 'flex')
conflicts=('crawl')
license=('custom')
install=stone-soup.install
source=("http://downloads.sourceforge.net/sourceforge/crawl-ref/stone_soup-$pkgver-nodeps.tar.bz2" 'stone-soup.desktop')
md5sums=('866e315470a592572e7ce8a7214c7615'
'6c5606ff26b7a8824d6de6c9b253bcdd')
build() {
cd $srcdir/stone_soup-$pkgver/source
sed -i 's|bin_prefix := bin|bin_prefix := usr/bin|' makefile || return 1
sed -i 's/INSTALL_UGRP := games:games/INSTALL_UGRP := root:games/' makefile || return 1
# stone-soup ascii
sed -i 's/GAME = crawl/GAME = stone-soup/' makefile || return 1
make DESTDIR=$pkgdir \
SAVEDIR="/usr/share/stone-soup/save" \
DATADIR="/usr/share/stone-soup/data" \
USE_UNICODE=y \
install || return 1
make clean || return 1
# stone-soup tiles
sed -i 's/GAME = stone-soup/GAME = stone-soup-tile/' makefile || return 1
make DESTDIR=$pkgdir \
SAVEDIR="/usr/share/stone-soup/save" \
DATADIR="/usr/share/stone-soup/data" \
TILES=y \
install || return 1
install -D -m644 $srcdir/stone-soup.desktop "$pkgdir/usr/share/applications/stone-soup.desktop" || return 1
install -D -m644 ../licence.txt "$pkgdir/usr/share/licenses/stone-soup/license.txt" || return 1
}
And thanks for the help.
Offline
I think there are some semi-standards for gaming stuff - but it's not an area I know about. Have a look at some other game PKGBUILDs, see what you can find. You could also have a look at the Arch Gaming repo - details in the wiki.
Offline
/var/games/$pkgname would seem to be the right place.
Online
I think there are some semi-standards for gaming stuff - but it's not an area I know about. Have a look at some other game PKGBUILDs, see what you can find. You could also have a look at the Arch Gaming repo - details in the wiki.
I didn't know about that repo--seems really convenient.
/var/games/$pkgname would seem to be the right place.
I saw a few PKGBUILDs using this directory as well. It does look comfy there, and not mucking with any system files. Thanks for the tip.
I'll mark this as SOLVED since I don't mind files in /var/games not being tracked by pacman.
Offline
Yeah some games are designed to only save files in the current directory. I've seen it before where some had to specify in the install file that the writing to directory needed ownership changed to be able to save game saves. Probably not recommended but really no alternative neither.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Can't the game just save its saved files to somewhere in the home folder and be done with it?
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
In many cases, upstream gives you no choice but to save these things outside your home directory. e.g. Some games like system-wide highscore files.
Online
Yeah some games are designed to only save files in the current directory. I've seen it before where some had to specify in the install file that the writing to directory needed ownership changed to be able to save game saves. Probably not recommended but really no alternative neither.
I thought this was what the 'games' group was for, though it doesn't see to be very common in arch.
Offline