1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Contributor: Lex Black <autumn-wind@web.de>
3 # Contributor: Alex Gentilucci <alexander.gentilucci@gmail.com>
8 pkgdesc='Portable Fasttracker II clone'
10 url='https://16-bits.org/ft2.php'
14 'custom:CC-BY-NC-SA-4.0'
30 _commit='fdcc53f651378abc003591a8e2371af7d6b393a1'
32 "$pkgname::git+https://github.com/8bitbubsy/ft2-clone#commit=$_commit"
33 'templatify-build-date.patch'
36 '530202416c15b7a5b35e0ff56bb633fed97e28d73bc4bfc1737a03098dfa6dfb0aa16751b58b3c7358f27cf7c0052143b752edeabe016a475b72e51f4c027543')
41 git describe --tags | sed 's/^v//'
49 release/macos/ft2-clone-macos.app/Contents/Resources/ft2-clone-macos.icns
51 # generate desktop file
54 --name 'Fasttracker II Clone' \
55 --pkgname "$pkgname" \
56 --pkgdesc "$pkgdesc" \
58 --genericname 'Chiptune Tracker'
60 # attempt repro build by using commit date as build date
61 local commit_date="$(git show --no-patch --format=%cd --date=format:'%d %B %Y')"
64 patch -p1 -i "$srcdir/templatify-build-date.patch"
66 # patch in commit date
67 sed -e "s/@DATE@/$commit_date/" -i src/ft2_header.h
74 -DEXTERNAL_LIBFLAC=ON \
75 -DCMAKE_BUILD_TYPE='None' \
76 -DCMAKE_INSTALL_PREFIX='/usr' \
83 DESTDIR="$pkgdir" cmake --install build
88 install -vDm644 ft2-clone-macos_512x512x32.png "$pkgdir/usr/share/icons/hicolor/512x512/apps/$pkgname.png"
91 install -vDm644 -t "$pkgdir/usr/share/applications" ft2-clone.desktop
94 install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
97 install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" release/LICENSES.txt