diff options
author | Martchus | 2019-05-14 18:37:59 +0200 |
---|---|---|
committer | Martchus | 2019-05-14 18:37:59 +0200 |
commit | 7e721daca9fccf43ee706023fa5d22a176fd454d (patch) | |
tree | 98552a9ec73cf24d582fc3c8e029f90f4a483cf6 | |
download | aur-7e721daca9fccf43ee706023fa5d22a176fd454d.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 62 |
2 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ca633576bee1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = midifile-git + pkgdesc = C++ classes for reading/writing Standard MIDI Files + pkgver = 256.97405c8 + pkgrel = 1 + url = http://midifile.sapp.org + arch = i686 + arch = x86_64 + arch = armv6h + arch = armv7h + arch = aarch64 + license = BSD + makedepends = cmake + makedepends = git + conflicts = midifile + source = midifile::git://github.com/craigsapp/midifile.git + sha256sums = SKIP + +pkgname = midifile-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..17f84799660e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Martchus <martchus@gmx.net> + +# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where +# you also find the URL of a binary repository. + +_reponame=midifile +pkgname=midifile-git +_name=${pkgname%-git} +pkgver=256.97405c8 +pkgrel=1 +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +pkgdesc='C++ classes for reading/writing Standard MIDI Files' +license=('BSD') +depends=() +makedepends=('cmake' 'git') +#provides=("${_name}") +conflicts=("${_name}") +url="http://midifile.sapp.org" +source=("${_reponame}::git://github.com/craigsapp/${_reponame}.git") +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/$_reponame" + echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$srcdir/$_reponame" + sed -i "s/ STATIC / SHARED /" CMakeLists.txt +} + +build() { + cd "$srcdir/$_reponame" + mkdir build && cd build + cmake \ + -DCMAKE_BUILD_TYPE:STRING='Release' \ + -DCMAKE_INSTALL_PREFIX:PATH='/usr' \ + -DCMAKE_SKIP_BUILD_RPATH:BOOL=ON \ + .. + make +} + +package() { + cd "$srcdir/$_reponame" + + # install manually (there's no install target) + + mkdir -p "${pkgdir}/usr/"{lib,bin,include/midifile} + + pushd build + # prevent conflict with sndio + for conflicting_file in midicat; do + mv $conflicting_file $conflicting_file-$_name + done + find \( -iname '*.so' \) -exec cp --target-directory="${pkgdir}/usr/lib" {} \; + find \( -maxdepth 1 -executable -type f -not -iname '*.so' \) -exec cp --target-directory="${pkgdir}/usr/bin" {} \; + popd + + pushd include + find \( -iname '*.h' -type f \) -exec cp --target-directory="${pkgdir}/usr/include/midifile" {} \; + popd +} |