summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorrespiranto2015-09-24 09:53:55 +0200
committerrespiranto2015-09-24 09:53:55 +0200
commit7bd6ee6b311ebd20911d9c6f281e841371e6ec33 (patch)
tree76b7de1b3330dfdd3cd074569e7b5da051f133ac
downloadaur-7bd6ee6b311ebd20911d9c6f281e841371e6ec33.tar.gz
Initlial upload
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD54
-rw-r--r--freesweep.install6
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..50fc6387f47d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = freesweep
+ pkgdesc = a console minesweeper-style game written in C for *nix
+ pkgver = 0.92
+ pkgrel = 1
+ url = http://freecode.com/projects/freesweep
+ install = freesweep.install
+ arch = x86_64
+ arch = i686
+ license = GPL
+ depends = ncurses
+ backup = etc/sweeprc
+ backup = var/games/freesweep/sweeptimes
+ source = https://freesweep.googlecode.com/files/freesweep-0.92.tar.gz
+ md5sums = e9ac8d2bc63b5d37863c731e13e023da
+
+pkgname = freesweep
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..88509c53703d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: respiranto <respiranto@icloud.com>
+pkgname=freesweep
+pkgver=0.92
+pkgrel=1
+pkgdesc="a console minesweeper-style game written in C for *nix"
+arch=('x86_64' 'i686')
+url="http://freecode.com/projects/freesweep"
+license=('GPL')
+depends=('ncurses')
+backup=('etc/sweeprc' "var/games/$pkgname/sweeptimes")
+install=$pkgname.install
+source=("https://freesweep.googlecode.com/files/freesweep-0.92.tar.gz")
+md5sums=('e9ac8d2bc63b5d37863c731e13e023da')
+# Scores do not really work currently; They are saved,
+# but for some reason not read / parsed correctly by the program,
+# i.e. no scores are displayed
+_scoresdir="/var/games/$pkgname"
+
+prepare()
+{
+ cd "$pkgname-$pkgver"
+ ln -sf /usr/share/libtool/build-aux/config.sub .
+ ln -sf /usr/share/libtool/build-aux/config.guess .
+ sed -i "s/0.8/$pkgver/" sweeprc
+ sed -i "s@mkstr(SCORESDIR)@\"$_scoresdir\"@" pbests.c
+}
+
+build()
+{
+ cd "$pkgname-$pkgver"
+ autoconf
+ ./configure --with-prefsdir=/etc --with-scoresdir="$_scoresdir"
+ make
+ touch sweeptimes
+}
+
+package()
+{
+ cd "$pkgname-$pkgver"
+ install -m 755 -d "$pkgdir/usr/bin"
+ install -m 755 -t "$pkgdir/usr/bin/" freesweep
+ install -m 755 -d "$pkgdir/etc"
+ install -m 644 -t "$pkgdir/etc/" sweeprc
+ install -m 755 -d "$pkgdir/usr/share/man/man6"
+ install -m 644 -t "$pkgdir/usr/share/man/man6/" freesweep.6
+ install -m 755 -d "$pkgdir/usr/share/doc/$pkgname"
+ install -m 644 -t "$pkgdir/usr/share/doc/$pkgname/" README
+
+ # It is doubtable whether /var/games/$pkgname is the appropriate location
+ # The alternative would be /var/lib/$pkgname
+ install -m 775 -g games -d "$pkgdir/var/games"
+ install -m 775 -g games -d "$pkgdir/var/games/$pkgname"
+ install -m 664 -g games -t "$pkgdir/var/games/$pkgname/" sweeptimes
+}
diff --git a/freesweep.install b/freesweep.install
new file mode 100644
index 000000000000..a47c3371a63e
--- /dev/null
+++ b/freesweep.install
@@ -0,0 +1,6 @@
+post_install()
+{
+ echo -e "\nAny user that is able to run this game should be added" \
+ "to the group 'games'.\nElse the program will fail due to" \
+ "a segmentation fault.\nYou will have to re-login afterwards"
+}