[arch-commits] Commit in milkytracker/trunk (PKGBUILD)

David Runge dvzrv at gemini.archlinux.org
Fri Nov 19 11:11:55 UTC 2021


    Date: Friday, November 19, 2021 @ 11:11:54
  Author: dvzrv
Revision: 1052761

upgpkg: milkytracker 1.03.00-2: Rebuild against rtmidi 5.0.0.

Remove the explicit use of C++98 for compiling, as dependency require C++11.
Apply current cmake package guidelines.
Simplify quotes in file.
Simplify installation in package().

Modified:
  milkytracker/trunk/PKGBUILD

----------+
 PKGBUILD |   42 ++++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 18 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-19 09:05:53 UTC (rev 1052760)
+++ PKGBUILD	2021-11-19 11:11:54 UTC (rev 1052761)
@@ -2,40 +2,46 @@
 # Contributor: Christopher O'Neill <milkytracker at chrisoneill.co.uk>
 # Contributor: Maks Verver <maksverver at geocities.com>
 
+_name=MilkyTracker
 pkgname=milkytracker
 pkgver=1.03.00
-pkgrel=1
+pkgrel=2
 pkgdesc='Music tracker inspired by Fast Tracker II'
 arch=(x86_64)
 url='https://milkytracker.titandemo.org/'
 license=(GPL3)
-depends=(alsa-lib lhasa rtmidi sdl2 zziplib)
+depends=(alsa-lib lhasa rtmidi sdl2 zlib zziplib)
 makedepends=(cmake jack ninja)
 optdepends=('jack: JACK audio support')
-# Disable stripping, ref FS#30018
+# Disable stripping
+# https://bugs.archlinux.org/task/30018
 options=(!strip)
 source=("$pkgname-$pkgver.tar.gz::https://github.com/milkytracker/MilkyTracker/archive/v$pkgver.tar.gz")
 sha256sums=('72d5357e303380b52383b66b51f944a77cd77e2b3bfeb227d87cc0e72ab292f7')
 
+prepare() {
+  mv -v $_name-$pkgver $pkgname-$pkgver
+  # remove explicit use of C++98 as dependencies use C++11
+  sed -e '/CMAKE_CXX_STANDARD/d' -e '/CMAKE_CXX_EXTENSIONS/d' -i $pkgname-$pkgver/CMakeLists.txt
+}
+
 build() {
-  mkdir -p build
-  cd build
-  cmake "../MilkyTracker-$pkgver" \
-    -DCMAKE_INSTALL_PREFIX=/usr \
+  cmake -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_INSTALL_LIBDIR=lib \
-    -G Ninja
-  ninja
+    -W nodev \
+    -B build \
+    -G Ninja \
+    $pkgname-$pkgver
+  ninja -C build
 }
 
 package() {
-  cd build
-  DESTDIR="$pkgdir" ninja install
-  cd "$srcdir/MilkyTracker-$pkgver/resources"
-  install -Dm644 pictures/carton.png \
-    "$pkgdir/usr/share/pixmaps/milkytracker.png"
-  install -Dm644 milkytracker.desktop \
-    "$pkgdir/usr/share/applications/milkytracker.desktop"
+  depends+=(libasound.so librtmidi.so)
+
+  DESTDIR="$pkgdir" ninja install -C build
+  cd $pkgname-$pkgver/resources
+  install -vDm 644 pictures/carton.png "$pkgdir/usr/share/pixmaps/${pkgname}.png"
+  install -vDm 644 ${pkgname}.desktop -t "$pkgdir/usr/share/applications/"
   # yes, this file extension is wrong
-  install -Dm644 milkytracker.appdata \
-    "$pkgdir/usr/share/appdata/milkytracker.appdata.xml"
+  install -vDm 644 ${pkgname}.appdata "$pkgdir/usr/share/appdata/${pkgname}.appdata.xml"
 }



More information about the arch-commits mailing list