Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic PKGBUILD templates #526

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions templates/cmake.PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Maintainer: OSAMC <https://github.com/osam-cologne/archlinux-proaudio>

pkgname=
pkgver=
pkgrel=1
pkgdesc=''
arch=(aarch64 x86_64)
url=''
license=()
groups=(pro-audio)
depends=()
makedepends=(cmake)
checkdepends=()
optdepends=()
source=()
sha256sums=()

prepare() {
}

build() {
local cmake_options=(
-B build-$pkgname
-S $pkgname-$pkgver
-W no-dev
-D CMAKE_BUILD_TYPE=None
-D CMAKE_INSTALL_PREFIX=/usr
)
cmake "${cmake_options[@]}"
cmake --build build-$pkgname
}

check() {
ctest --test-dir build-$pkgname --output-on-failure
}

package() {
DESTDIR="$pkgdir" cmake --install build-$pkgname
}
28 changes: 28 additions & 0 deletions templates/empty.PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Maintainer: OSAMC <https://github.com/osam-cologne/archlinux-proaudio>

pkgname=
pkgver=
pkgrel=1
pkgdesc=''
arch=(aarch64 x86_64)
url=''
license=()
groups=(pro-audio)
depends=()
makedepends=()
checkdepends=()
optdepends=()
source=()
sha256sums=()

prepare() {
}

build() {
}

check() {
}

package() {
}
37 changes: 37 additions & 0 deletions templates/vcvrack-plugin.PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Maintainer: OSAMC <https://github.com/osam-cologne/archlinux-proaudio>

_slug=
_name=
pkgname=vcvrack-
pkgver=
pkgrel=1
pkgdesc=''
arch=(aarch64 x86_64)
url=''
license=()
groups=(pro-audio vcvrack-plugins)
depends=(gcc-libs vcvrack)
makedepends=(simde zstd)
source=()
sha256sums=()

prepare() {
cd $_name-$pkgver
# optional: remove unnecessary files like common license (GPL etc.) or files not required for running the plugin
rm LICENSE.txt
}

build() {
cd $_name-$pkgver
make SLUG=$_slug VERSION=$pkgver RACK_DIR=/usr/share/vcvrack dist
}

package() {
cd $_name-$pkgver
install -d "$pkgdir"/usr/lib/vcvrack/plugins
cp -va dist/$_slug -t "$pkgdir"/usr/lib/vcvrack/plugins

# optional: install license if required (BSD etc.)
install -d "$pkgdir"/usr/share/licenses/$pkgname
mv -v "$pkgdir"/usr/lib/vcvrack/plugins/$_slug/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname
}
2 changes: 1 addition & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Increment the pkgrel of a list of packages, passed as arguments or stdin:

```bash
./tools/bump-pkgrel.sh abcpp faustlive
./tools/bump-pkgrel.sh < __EOF__
./tools/bump-pkgrel.sh << __EOF__
abcpp
faustlive
__EOF__
Expand Down