Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save truatpasteurdotfr/ef9f3524296ec83ed755914219e3479c to your computer and use it in GitHub Desktop.
Save truatpasteurdotfr/ef9f3524296ec83ed755914219e3479c to your computer and use it in GitHub Desktop.
APKBUILD singularity 2.2.1
# Contributor: "Tru Huynh <[email protected]>"
# Maintainer: "Tru Huynh <[email protected]>"
pkgname=singularity
pkgver=2.2.1
pkgrel=0
pkgdesc="Singularity: Application containers for Linux"
url="http://singularity.lbl.gov"
arch="x86_64"
license="LNL"
depends=""
depends_dev="autoconf automake gcc make libtool linux-headers"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc $pkgname-examples"
#source="${pkgname}-${pkgver}.tar.gz"
source="${pkgname}-${pkgver}.tar.gz::https://github.com/singularityware/singularity/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"
options="suid"
builddir=$srcdir/${pkgname}-${pkgver}
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
|| return 1
make -j 1 || return 1
}
package() {
cd "$builddir"
make -j 1 DESTDIR="$pkgdir" install || return 1
# gzip man page
gzip "$pkgdir"/usr/share/man/man1/singularity.1 || return 1
}
doc() {
arch="noarch"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname" || return 1
# Doc files
_docs="AUTHORS COPYING ChangeLog INSTALL NEWS README.md"
for _doc in $_docs; do
install -Dm644 "$srcdir"/$pkgname-$pkgver/$_doc \
"$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
done
}
examples() {
arch="noarch"
# Put the examples into a seperate package
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"/examples || return 1
mv "$builddir"/examples/* "$subpkgdir"/usr/share/doc/"$pkgname"/examples || return 1
}
md5sums="31b705b3925995f1418e7ff71047b3e7 singularity-2.2.1.tar.gz"
sha256sums="0e2a0b0cf6c8d4dc041365f715b2df157e0d8d89986e4eb111c61716df031c8a singularity-2.2.1.tar.gz"
sha512sums="b1195e98254957cd8d80b35b13d4f11060c5836f05ed450d242544fc30f8c298b837ba8986b1184288bc9a5ff2ebb5b1f56dc55a0686b540242b0042a152f902 singularity-2.2.1.tar.gz"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment