diff options
author | Severin Glöckner | 2018-10-17 19:58:50 +0200 |
---|---|---|
committer | Severin Glöckner | 2018-10-17 20:00:21 +0200 |
commit | 5d6d3391271c4b09a92dff9546f8eb2d16b79d72 (patch) | |
tree | 99d10c8e57bb5e1ca82c3b938da85b662bc3a311 | |
parent | d07137e5eea77e77cc07cc43487574340ee021a4 (diff) | |
download | aur-5d6d3391271c4b09a92dff9546f8eb2d16b79d72.tar.gz |
improved pkgbuild
- remove checkdepends
- cleanups
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | wesnothd-1.12.service | 4 |
3 files changed, 19 insertions, 38 deletions
@@ -6,12 +6,8 @@ pkgbase = wesnoth-1.12 arch = i686 arch = x86_64 license = GPL - checkdepends = desktop-file-utils - checkdepends = appstream-glib makedepends = boost - makedepends = gettext makedepends = cmake - makedepends = make depends = sdl depends = sdl_image depends = sdl_mixer @@ -36,7 +32,7 @@ pkgbase = wesnoth-1.12 sha256sums = a50f384cead15f68f31cfa1a311e76a12098428702cb674d3521eb169eb92e4e sha256sums = f765499315d6650fe91424c0818cc57fc9fd06108c29e78c2db987c148dbf877 sha256sums = 4d11e481ad8610bb2ad65290d2b3d1bf2d058485deaa9016325499b113e0f89f - sha256sums = a2c2c36d141cb0428d699266a75b66c338070deadab05ca678a12086cae0d7cf + sha256sums = 852fbdf8f4d2d366083136d241809b87880beb74d44465c03713c3ca900a0a78 sha256sums = d3f031c70e59ac544712c45e6fd9be7cd79f481aad38977e7a129e1bede54840 sha256sums = 74bfc9187b3cdd1744477ca509344a516a94c9992a4c6273ed8a9f370d96600a @@ -8,11 +8,9 @@ pkgdesc="Turn-based strategy game on a fantasy world (legacy version)" arch=('i686' 'x86_64') url="https://www.wesnoth.org" license=('GPL') -depends=('sdl' 'sdl_image' 'sdl_mixer' 'sdl_ttf' 'sdl_net' 'boost-libs' 'bzip2' 'zlib' 'libvorbis' 'pango' 'cairo' 'fontconfig' 'dbus' 'fribidi') -makedepends=('boost' 'gettext' 'cmake' 'make') -checkdepends=('desktop-file-utils' 'appstream-glib') +depends=('sdl' 'sdl_image' 'sdl_mixer' 'sdl_ttf' 'sdl_net' 'boost-libs' 'bzip2' 'zlib' 'libvorbis' 'pango' 'cairo' 'fontconfig' 'dbus' 'fribidi' 'readline') +makedepends=('boost' 'gettext' 'cmake') options=('!emptydirs') -#options=('!emptydirs' '!strip') #use this when building with debugging symbols source=("https://downloads.sourceforge.net/sourceforge/wesnoth/wesnoth-$pkgver.tar.bz2" "wesnoth$_suffix.desktop" "wesnothd$_suffix.tmpfiles.conf" @@ -23,24 +21,19 @@ source=("https://downloads.sourceforge.net/sourceforge/wesnoth/wesnoth-$pkgver.t sha256sums=('a50f384cead15f68f31cfa1a311e76a12098428702cb674d3521eb169eb92e4e' 'f765499315d6650fe91424c0818cc57fc9fd06108c29e78c2db987c148dbf877' '4d11e481ad8610bb2ad65290d2b3d1bf2d058485deaa9016325499b113e0f89f' - 'a2c2c36d141cb0428d699266a75b66c338070deadab05ca678a12086cae0d7cf' + 'ccbfcf1516d45ce29e2416a138c0fb3ae71ab479ecb5f6f5e343d009dc933288' 'd3f031c70e59ac544712c45e6fd9be7cd79f481aad38977e7a129e1bede54840' '74bfc9187b3cdd1744477ca509344a516a94c9992a4c6273ed8a9f370d96600a') PKGEXT='.pkg.tar' prepare() { - cd "$srcdir/wesnoth-$pkgver" - - #How to manually create a patch - #diff -rupN src/ src_new/ > patch_name.patch + cd wesnoth-$pkgver patch -Np1 < ${srcdir}/wesnoth-boost.patch } build() { - cd "$srcdir/wesnoth-$pkgver" - # As this is an older version and not worked on anymore, it will someday break # If you happen to find a fix, please fill a Pull Request for the 1.12 branch # at bugs.wesnoth.org @@ -50,7 +43,7 @@ build() { export CXXFLAGS="$CXXFLAGS -w" rm -rf build && mkdir build && cd build - cmake .. \ + cmake ../wesnoth-$pkgver \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBINARY_SUFFIX=-1.12 \ -DDATADIRNAME=wesnoth-1.12 \ @@ -59,39 +52,31 @@ build() { -DPREFERENCES_DIR=.local/share/wesnoth/1.12 \ -DENABLE_OMP=ON \ -DENABLE_DESKTOP_ENTRY=OFF \ - -DENABLE_DISPLAY_REVISION=NO \ + -DENABLE_DISPLAY_REVISION=OFF \ -Wno-dev # silence cmake warnings - make -} - -check() { - cd "$srcdir" - desktop-file-validate --no-hints --no-warn-deprecated *.desktop - appstream-util validate-relax *.appdata.xml + make -j 4 } package() { - cd "$srcdir/wesnoth-$pkgver/build" + cd build make DESTDIR="$pkgdir" install - cd "$srcdir/wesnoth-$pkgver" + # add suffix to manpages + cd "$pkgdir/usr/share/man" + for filename in man6/wesnoth.6 */man6/wesnoth.6 man6/wesnothd.6 */man6/wesnothd.6 + do + mv "$filename" $(dirname $filename)/$(basename $filename .6)-1.12.6 + done - # better use the tools from a recent version of wesnoth + # better use the tools from the newest version of wesnoth rm -r "$pkgdir/usr/share/wesnoth$_suffix/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 - # add suffix to manpages - cd "$pkgdir/usr/share/man" - for filename in man6/*.6 */man6/*.6 - do - mv "$filename" $(dirname $filename)/$(basename $filename .6)-1.12.6 - done - - # INSTALLING of menu entry and icons as well as systemd files and appstream information: + # 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/wesnoth-$pkgver/images/game-icon.png" "$pkgdir/usr/share/icons/hicolor/64x64/apps/$pkgname-icon.png" install -D -m644 "$srcdir/wesnoth-$pkgver/data/core/images/wesnoth-icon.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/$pkgname-icon.png" diff --git a/wesnothd-1.12.service b/wesnothd-1.12.service index 22a4d60c6c29..101dd6ab92f0 100644 --- a/wesnothd-1.12.service +++ b/wesnothd-1.12.service @@ -1,10 +1,10 @@ [Unit] Description=Wesnoth-1.12 Server Daemon Documentation=https://www.wesnoth.org/wiki/ServerAdministration -Documentation=man:wesnoth-1.12(6) +Documentation=man:wesnothd-1.12(6) After=network.target # They use by default the same port -Conflicts=wesnothd.service wesnothd-1.8.service wesnothd-1.10.service wesnothd-1.14.service wesnothd-devel.service wesnothd-git.service +Conflicts=wesnothd.service wesnothd-1.6.service wesnothd-1.8.service wesnothd-1.10.service wesnothd-1.14.service wesnothd-devel.service wesnothd-git.service [Service] ExecStart=/usr/bin/wesnothd-1.12 -t 2 -T 5 |