summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD53
-rw-r--r--wesnothd-1.6.service2
3 files changed, 25 insertions, 39 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1d54e599439c..fc3eabe29393 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,14 @@
pkgbase = wesnoth-1.6
- pkgdesc = Turn-based strategy game on a fantasy world (legacy version for old replays)
+ pkgdesc = Turn-based strategy game on a fantasy world (for old replays)
pkgver = 1.6.5+dev
pkgrel = 1
url = https://www.wesnoth.org
arch = i686
arch = x86_64
license = GPL
- checkdepends = desktop-file-utils
- checkdepends = appstream-glib
makedepends = boost
- makedepends = gettext
makedepends = cmake
- makedepends = make
+ makedepends = git
depends = sdl
depends = sdl_image
depends = sdl_mixer
@@ -31,7 +28,7 @@ pkgbase = wesnoth-1.6
source = wesnoth-1.6.appdata.xml
md5sums = 99f136647c5af1820d0132df08350965
md5sums = ec9cab718ba96b7a4c85c224f6b747c3
- md5sums = cb2c4cc145b526f570a837a5055a71dc
+ md5sums = 11fbbf345aae2a2e3f45de5fcfd479d3
md5sums = 1018b1fae1a65d49bed1094ba0280d87
pkgname = wesnoth-1.6
diff --git a/PKGBUILD b/PKGBUILD
index c26006698472..2ce39ea0ad0a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,15 +4,15 @@ _suffix=-1.6
pkgname=wesnoth-1.6
pkgver=1.6.5+dev
pkgrel=1
-pkgdesc="Turn-based strategy game on a fantasy world (legacy version for old replays)"
+pkgdesc="Turn-based strategy game on a fantasy world (for old replays)"
arch=('i686' 'x86_64')
url="https://www.wesnoth.org"
license=('GPL')
depends=('sdl' 'sdl_image' 'sdl_mixer' 'sdl_ttf' 'sdl_net' 'boost-libs' 'zlib' 'pango' 'cairo' 'fontconfig' 'dbus' 'fribidi')
-makedepends=('boost' 'gettext' 'cmake' 'make')
-checkdepends=('desktop-file-utils' 'appstream-glib')
+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 zlib1g-dev libpango1.0-dev libcairo2-dev libfontconfig1-dev libdbus-1-dev libfribidi-dev gettext-base cmake make pkgconf gcc g++ git
options=('!emptydirs')
-#options=('!emptydirs' '!strip') #use this when building with debugging symbols
source=("wesnoth$_suffix.desktop"
"wesnothd$_suffix.tmpfiles.conf"
"wesnothd$_suffix.service"
@@ -20,7 +20,7 @@ source=("wesnoth$_suffix.desktop"
md5sums=('99f136647c5af1820d0132df08350965'
'ec9cab718ba96b7a4c85c224f6b747c3'
- 'cb2c4cc145b526f570a837a5055a71dc'
+ '11fbbf345aae2a2e3f45de5fcfd479d3'
'1018b1fae1a65d49bed1094ba0280d87')
PKGEXT='.pkg.tar'
@@ -29,17 +29,11 @@ prepare() {
cd "$startdir"
# get a shallow clone of the git repo and store it outside the srcdir
- msg "Connecting to git server..."
-
- if [ -d "$pkgname-git" ] ; then
- cd "$pkgname-git" && git pull origin
- msg "The local files are up to date"
- else
- git clone https://github.com/wesnoth/wesnoth -b 1.6 --shallow-exclude=1.6.5 --single-branch $pkgname-git
+ if [ ! -d "$pkgname-git" ] ; then
+ git clone https://github.com/wesnoth/wesnoth -b 1.6 --shallow-exclude=1.6.5 $pkgname-git
msg "Git checkout done (or server timeout)"
fi
-
ln -sf "$startdir/$pkgname-git" "$srcdir/$pkgname-git"
}
@@ -47,11 +41,9 @@ build() {
# 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.6 branch
# at bugs.wesnoth.org
- export CXX_FLAGS="$CXX_FLAGS -w"
- export C_FLAGS="$C_FLAGS -w"
rm -rf build && mkdir -p build && cd build
- cmake ../$pkgname-git \
+ cmake ../$pkgname-git \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBINARY_SUFFIX=-1.6 \
-DDATADIRNAME=wesnoth-1.6 \
@@ -60,37 +52,34 @@ build() {
-DPREFERENCES_DIR=.local/share/wesnoth/1.6 \
-DENABLE_DESKTOP_ENTRY=OFF \
-Wno-dev \
- -DCMAKE_CXX_FLAGS="$CXX_FLAGS -ansi" \
- -DCMAKE_C_FLAGS="$C_FLAGS -ansi"
- make
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS -ansi -w" \
+ -DCMAKE_C_FLAGS="$CFLAGS -ansi -w"
+ make -j 4
}
-check() {
- desktop-file-validate --no-hints --no-warn-deprecated *.desktop
- appstream-util validate-relax *.appdata.xml
-}
+# Note: the manpages are first installed to the same place which other wesnoth
+# versions use and renamed afterwards, this may cause conflicts. One can change
+# -DMANDIR above to specify another location.
+
+# 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.
package() {
cd "$srcdir/build"
make DESTDIR="$pkgdir" install
- # better use the tools from a recent version of wesnoth
- rm -r "$pkgdir/usr/share/wesnoth$_suffix/data/tools"
-
- # these translation files are not needed anymore after building
- 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
+ for filename in */man6/wesnoth.6 man6/wesnoth.6 */man6/wesnothd.6 man6/wesnothd.6
do
mv "$filename" $(dirname $filename)/$(basename $filename .6)-1.6.6
done
+ # better use the tools from a recent version of wesnoth
+ rm -r "$pkgdir/usr/share/wesnoth$_suffix/data/tools"
- # 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/$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"
diff --git a/wesnothd-1.6.service b/wesnothd-1.6.service
index 73c02754d3cb..dde60adc17b1 100644
--- a/wesnothd-1.6.service
+++ b/wesnothd-1.6.service
@@ -4,7 +4,7 @@ Documentation=https://www.wesnoth.org/wiki/ServerAdministration
Documentation=man:wesnoth-1.6(6)
After=network.target
# They use by default the same port
-Conflicts=wesnothd.service wesnothd-1.12.service wesnothd-1.14.service wesnothd-git.service
+Conflicts=wesnothd.service wesnothd-1.8.service wesnothd-1.10.service wesnothd-1.12.service wesnothd-1.14.service wesnothd-devel.service wesnothd-git.service
[Service]
ExecStart=/usr/bin/wesnothd-1.6 -t 2 -T 5