54 lines
1.5 KiB
Plaintext
54 lines
1.5 KiB
Plaintext
# Maintainer: Martchus <martchus@gmx.net>
|
|
<%== content_for 'additional_contributors' %>\
|
|
|
|
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
|
|
# you also find the URL of a binary repository.
|
|
|
|
<%== content_for 'comment_header' %>\
|
|
_reponame=<%= stash('reponame') // $package_name %>
|
|
pkgname=<%= $package_name %>
|
|
<%== content %>\
|
|
url="https://github.com/Martchus/${_reponame}"
|
|
% if ($is_vcs_variant) {
|
|
source=("${_reponame}::${MARTCHUS_GIT_URL_PREFIX:-git+https://github.com/Martchus}/${_reponame}.git")
|
|
sha256sums=('SKIP')
|
|
% }
|
|
% else {
|
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
|
|
sha256sums=('<%== $project_sha256sum %>')
|
|
% }
|
|
% if ($is_cross_variant) {
|
|
options=(!buildflags staticlibs !strip !emptydirs)
|
|
% }
|
|
|
|
<%== content_for 'additional_content' %>\
|
|
% if (stash('needs_port')) {
|
|
ephemeral_port() {
|
|
comm -23 <(seq 49152 65535) <(ss -tan | awk '{print $4}' | cut -d':' -f2 | grep "[0-9]\{1,5\}" | sort | uniq) | shuf | head -n 1
|
|
}
|
|
|
|
% }
|
|
% if ($is_vcs_variant) {
|
|
pkgver() {
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}"
|
|
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
|
|
}
|
|
|
|
% }
|
|
build() {
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
%== include 'own-project-build'
|
|
}
|
|
|
|
% if (content_for('check_args')->size) {
|
|
check() {
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
%== include 'own-project-check'
|
|
}
|
|
|
|
% }
|
|
package() {
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
%== include 'own-project-package'
|
|
}
|