diff options
author | Jonathan Kotta | 2021-02-23 19:53:47 -0600 |
---|---|---|
committer | Jonathan Kotta | 2021-02-23 19:53:47 -0600 |
commit | ca66ee951417e61a8d4e829df1268cbb73508802 (patch) | |
tree | 90196c24cc4d30b7c0ce30696166dce54c9810c8 | |
download | aur-ca66ee951417e61a8d4e829df1268cbb73508802.tar.gz |
create package
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rwxr-xr-x | launcher.sh | 25 |
3 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ca8fdb469526 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = starnet++-bin + pkgdesc = StarNet is a neural network that can remove stars from images in one simple step leaving only background. + pkgver = 1.1 + pkgrel = 1 + url = https://sourceforge.net/projects/starnet/ + arch = x86_64 + license = APACHE + depends = bash + source = https://newcontinuum.dl.sourceforge.net/project/starnet/v1.1/StarNet_Linux.tar.gz + source = launcher.sh + md5sums = 454cfa616bf8ade6a28bf1ada5f27429 + md5sums = dbf63532bbbdd1d0332307347283a085 + +pkgname = starnet++-bin + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d24224782203 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Jonathan Kotta <jpkotta@gmail.com> + +_pkgname=starnet++ +pkgname=starnet++-bin +pkgver=1.1 +pkgrel=1 +epoch= +pkgdesc="StarNet is a neural network that can remove stars from images in one simple step leaving only background." +arch=('x86_64') +url="https://sourceforge.net/projects/starnet/" +license=('APACHE') +groups=() +depends=("bash") +makedepends=() +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +source=("https://newcontinuum.dl.sourceforge.net/project/starnet/v${pkgver}/StarNet_Linux.tar.gz" + launcher.sh) +md5sums=('454cfa616bf8ade6a28bf1ada5f27429' + 'dbf63532bbbdd1d0332307347283a085') +noextract=() +validpgpkeys=() + +package() { + cd "release" + + #install -D LICENSE /usr/share/licenses/$pkgname/LICENSE + dest="$pkgdir/usr/lib/${pkgname}" + install -D -t "$dest" -m 644 *.pb *.so.? README.txt + install -D -t "$dest" -m 755 mono_starnet++ rgb_starnet++ + + cd "$srcdir" + install -D -m 755 launcher.sh "$pkgdir"/usr/bin/starnet-rgb + install -D -m 755 launcher.sh "$pkgdir"/usr/bin/starnet-mono +} diff --git a/launcher.sh b/launcher.sh new file mode 100755 index 000000000000..254cdd7bb000 --- /dev/null +++ b/launcher.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +#set -o xtrace +set -o errexit -o nounset -o pipefail -o errtrace +IFS=$'\n\t' + +if [[ $0 == *rgb ]] ; then + color=rgb +elif [[ $0 == *mono ]] ; then + color=mono +else + exit 1 +fi + +src=${1:-} +src=$(readlink -f "$src") +dst=${2:-} +if [ -n "$dst" ] ; then + dst=$(readlink -f "$dst") +fi +stride=${3:-} + +cd /usr/lib/starnet++/ + +./${color}_starnet++ "$src" "$dst" $stride |