summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorButui Hu2019-11-20 21:10:39 +0800
committerButui Hu2019-11-20 21:10:39 +0800
commit8ea25a47aff3398f0ff577acebf04014a065bf3e (patch)
tree00694f53311f92b1b933d9ce8babd7fd64c53104
downloadaur-8ea25a47aff3398f0ff577acebf04014a065bf3e.tar.gz
add itk-snap-nightly-bin
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD58
2 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..2164ac652f4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = itk-snap-nightly-bin
+ pkgdesc = A software application used to segment structures in 3D medical images (nightly build)
+ pkgver = 3.8.0.r4.8ad549e8
+ pkgrel = 1
+ url = https://www.itksnap.org
+ arch = x86_64
+ license = GPL
+ makedepends = gendesk
+ makedepends = git
+ depends = curl
+ depends = glib2
+ provides = itk-snap=3.8.0.r4.8ad549e8
+ conflicts = itk-snap
+ noextract = itk-snap.tar.gz
+ source = itk-snap-git::git+https://git.code.sf.net/p/itk-snap/src
+ source = itk-snap.tar.gz::https://sourceforge.net/projects/itk-snap/files/itk-snap/Nightly/itksnap-nightly-master-Linux-gcc64.tar.gz
+ source = itk-snap.png::https://sourceforge.net/p/itk-snap/src/ci/master/tree/GUI/Qt/Resources/logo_square.png?format=raw
+ sha512sums = SKIP
+ sha512sums = 9e5d4964e182303f1aacb207ed23e00a9421c79e678d3185d6740036f321380a5afbb915f5758f0e870232751a84bf6e958d5cddc86a021b81b50372ff510a97
+ sha512sums = 7d7866a4f28ee645cf4a454488d197a776475d2959d0f9d4d34cf534f34a73ffbb1b92430518f36948b4c25b736990693be07dd345600ed8292e526e2846fca1
+
+pkgname = itk-snap-nightly-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..fa7bbcad16a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Butui Hu <hot123tea123@gmail.com>
+
+pkgname=itk-snap-nightly-bin
+_pkgname=itk-snap
+pkgver=3.8.0.r4.8ad549e8
+_pkgver=3.8.0
+pkgrel=1
+pkgdesc='A software application used to segment structures in 3D medical images (nightly build)'
+arch=('x86_64')
+url='https://www.itksnap.org'
+license=('GPL')
+depends=(
+ 'curl'
+ 'glib2'
+)
+makedepends=(
+ 'gendesk'
+ 'git'
+)
+provides=(itk-snap=${pkgver})
+conflicts=('itk-snap')
+source=(
+ "${_pkgname}-git::git+https://git.code.sf.net/p/itk-snap/src"
+ "${_pkgname}.tar.gz::https://sourceforge.net/projects/itk-snap/files/itk-snap/Nightly/itksnap-nightly-master-Linux-gcc64.tar.gz"
+ "${_pkgname}.png::https://sourceforge.net/p/itk-snap/src/ci/master/tree/GUI/Qt/Resources/logo_square.png?format=raw"
+)
+sha512sums=('SKIP'
+ '9e5d4964e182303f1aacb207ed23e00a9421c79e678d3185d6740036f321380a5afbb915f5758f0e870232751a84bf6e958d5cddc86a021b81b50372ff510a97'
+ '7d7866a4f28ee645cf4a454488d197a776475d2959d0f9d4d34cf534f34a73ffbb1b92430518f36948b4c25b736990693be07dd345600ed8292e526e2846fca1')
+noextract=("${_pkgname}.tar.gz")
+
+pkgver() {
+ cd "${srcdir}/${_pkgname}-git"
+ printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g' | sed 's/^v//')"
+}
+
+prepare() {
+ # manually extract tarball due to their unpredicted name
+ mkdir "${srcdir}/${_pkgname}"
+ tar xvf "${srcdir}/${_pkgname}.tar.gz" -C "${srcdir}/${_pkgname}" --strip-components 1
+ echo "Creating desktop file"
+ gendesk -f -n --pkgname ${_pkgname} \
+ --pkgdesc "${pkgdesc}" \
+ --categories "Education;Graphics;Science;DataVisualization;MedicalSoftware;Viewer" \
+ --icon "${_pkgname}" \
+ --exec "itksnap"
+}
+
+package() {
+ install -d "${pkgdir}/usr"
+ for item in $(ls "${srcdir}/${_pkgname}"); do
+ mv -v "${srcdir}/${_pkgname}/${item}" "${pkgdir}/usr"
+ done
+ install -Dm644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+ install -Dm644 "${srcdir}/${_pkgname}.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
+}
+# vim:set ts=2 sw=2 et:
+