summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD74
1 files changed, 48 insertions, 26 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d1f90f31f08..e0d51d4312e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,12 @@
-# Maintainer Severin Glöckner <severin dot gloeckner at stud dot htwk minus leipzig dot de>
+# Maintainer Severin Glöckner <severin.gloeckner@stud.htwk-leipzig.de>
+
+# This script contains as well instructions for other Linux systems.
+# There you have to execute the commands in the functions(){…} below by hand.
+
+# On other systems, ignore the used variables like $pkgdir, $srcdir or $startdir
+# (there $pkgdir would be the same as an undefined variable (empty),
+# and $srcdir as well as $stardir would be the place where you have your files)
-_suffix=-1.8
pkgname=wesnoth-1.8
pkgver=1.8.6+dev
pkgrel=5
@@ -13,15 +19,17 @@ makedepends=('boost' 'cmake' 'git')
# package names on Debian / Ubuntu / Mint:
# libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl-net1.2-dev libboost-iostreams-dev libboost-regex-dev libboost-serialization-dev zlib1g-dev libpango1.0-dev libcairo2-dev libfontconfig1-dev libdbus-1-dev libfribidi-dev liblua5.1.0-dev gettext-base cmake make pkgconf gcc g++ git
options=('!emptydirs')
-source=("wesnoth$_suffix.desktop"
- "wesnothd$_suffix.tmpfiles.conf"
- "wesnothd$_suffix.service"
- "wesnoth$_suffix.appdata.xml")
+source=("wesnoth-1.8.desktop"
+ "wesnothd-1.8.tmpfiles.conf"
+ "wesnothd-1.8.service"
+ "wesnoth-1.8.appdata.xml")
+# Not finding the files? https://aur.archlinux.org/packages/wesnoth-1.8/
+# Rest assured, they are optional. Things like a launcher for your convenience…
md5sums=('7fa59aab4ec96e6466dd276a76462e78'
'a3afc892c43bbff72a9b150de513beaf'
- '47fb0b812309ae367744b3306a5a5b84'
- '46f8e791922b58f4b0cea7bebef511ad')
+ '662d5e828bcada131b66820b59210eb1'
+ '84418024db8d66acd2ce2489b5176a9b')
PKGEXT='.pkg.tar'
@@ -29,12 +37,15 @@ prepare() {
cd "$startdir"
# get a shallow clone of the git repo and store it outside the srcdir
- if [ ! -d "$pkgname-git" ] ; then
- git clone https://github.com/wesnoth/wesnoth -b 1.8 --shallow-exclude=1.8.6 $pkgname-git
+ if [ ! -d "wesnoth-1.8-git" ] ; then
+ git clone https://github.com/wesnoth/wesnoth -b 1.8 --shallow-exclude=1.8.6 wesnoth-1.8-git
msg "Git checkout done (or server timeout)"
fi
- ln -sf "$startdir/$pkgname-git" "$srcdir/$pkgname-git"
+ # Archlinux specific (hide the usage of the $startdir variable)
+ if [ ! -e "$srcdir/wesnoth-1.8-git" ] ; then
+ ln -s "$startdir/wesnoth-1.8-git" "$srcdir/wesnoth-1.8-git"
+ fi
}
build() {
@@ -46,8 +57,12 @@ build() {
export CFLAGS="$CFLAGS -w"
export CXXFLAGS="$CXXFLAGS -w"
+ # It's a convention to use /usr/local when installing by hand, it allows you
+ # to keep easier track of what was installed.
+ # Feel free to replace ALL occurences of /usr with /usr/local in the commands
+ # below, and edit the start command in the file wesnothd-1.2.service.
rm -rf build && mkdir build && cd build
- cmake ../$pkgname-git \
+ cmake ../wesnoth-1.8-git \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBINARY_SUFFIX=-1.8 \
-DDATADIRNAME=wesnoth-1.8 \
@@ -66,32 +81,39 @@ build() {
# For the Archlinux package this is no problem because the files are installed
# into the empty $pkgdir, and it's content is copied later to the system.
+# Thes commands below have to be run with root privileges.
+# E.g. by prefixing them with "sudo ".
package() {
cd build
+ # On Debian / Ubuntu / Mint / Fedora / Suse, just "make install"
make DESTDIR="$pkgdir" install
- # add suffix to manpages
- cd "$pkgdir/usr/share/man"
- for filename in */man6/wesnoth.6 man6/wesnoth.6 */man6/wesnothd.6 man6/wesnothd.6
+ # add suffix to manpages (.6 is the file extension for manpages)
+ for filename in "$pkgdir"/usr/share/man/{,*/}man6/wesnoth{,d}.6
do
mv $filename $(dirname $filename)/$(basename $filename .6)-1.8.6
done
- # better use the tools from a recent version of wesnoth
- rm -r "$pkgdir/usr/share/wesnoth$_suffix/data/tools"
+ # use the patched tools from a recent version of wesnoth
+ rm -r "$pkgdir/usr/share/wesnoth-1.8/data/tools"
- # these translation files are not needed
- find "$pkgdir/usr/share/wesnoth$_suffix/translations" -name wesnoth-manpages.mo -delete
- find "$pkgdir/usr/share/wesnoth$_suffix/translations" -name wesnoth-manual.mo -delete
+ # these files are not needed
+ find "$pkgdir/usr/share/wesnoth-1.8/translations" -name wesnoth-manpages.mo -delete
+ find "$pkgdir/usr/share/wesnoth-1.8/translations" -name wesnoth-manual.mo -delete
+ find "$pkgdir/usr/share" -name .gitignore -delete
# placing relevant packaging files (launcher, icons, systemd and appdata files)
- install -D -m644 "$srcdir/wesnoth$_suffix.desktop" "$pkgdir/usr/share/applications/wesnoth$_suffix.desktop"
- install -D -m644 "$srcdir/$pkgname-git/images/wesnoth-icon-small.png" "$pkgdir/usr/share/icons/hicolor/64x64/apps/$pkgname-icon.png"
- install -D -m644 "$srcdir/$pkgname-git/data/core/images/wesnoth-icon.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/$pkgname-icon.png"
+ install -D -m644 "$srcdir/wesnoth-1.8.desktop" "$pkgdir/usr/share/applications/wesnoth-1.8.desktop"
+ install -D -m644 "$srcdir/wesnoth-1.8-git/images/wesnoth-icon-small.png" "$pkgdir/usr/share/icons/hicolor/64x64/apps/wesnoth-1.8-icon.png"
+ install -D -m644 "$srcdir/wesnoth-1.8-git/data/core/images/wesnoth-icon.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/wesnoth-1.8-icon.png"
+
+ install -D -m644 "$srcdir/wesnoth-1.8.appdata.xml" "$pkgdir/usr/share/metainfo/wesnoth-1.8.appdata.xml"
- install -D -m644 "$srcdir/wesnothd$_suffix.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/wesnothd$_suffix.conf"
- install -D -m644 "$srcdir/wesnothd$_suffix.service" "$pkgdir/usr/lib/systemd/system/wesnothd$_suffix.service"
+ # On other Linux systems, use /etc instead of /usr/lib for these two files
+ install -D -m644 "$srcdir/wesnothd-1.8.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/wesnothd-1.8.conf"
+ install -D -m644 "$srcdir/wesnothd-1.8.service" "$pkgdir/usr/lib/systemd/system/wesnothd-1.8.service"
- install -D -m644 "$srcdir/wesnoth$_suffix.appdata.xml" "$pkgdir/usr/share/metainfo/wesnoth$_suffix.appdata.xml"
+ # All done, but it doesn't show up? Try that:
+ # update-desktop-database
}