aboutsummaryrefslogtreecommitdiffstats
path: root/main/sprunge
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-11-17 10:49:27 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2015-11-17 10:49:34 +0100
commitd85e5f696061737024ea55202e0803ef7b305b3b (patch)
tree3371bd60e9a8a5c561593a8dbbf27a3ec2e471dd /main/sprunge
parent6eda868005a358647e4f88019c9e9db9a41da523 (diff)
downloadaports-d85e5f696061737024ea55202e0803ef7b305b3b.tar.bz2
aports-d85e5f696061737024ea55202e0803ef7b305b3b.tar.xz
main/sprunge: use dedicated script per service
Diffstat (limited to 'main/sprunge')
-rw-r--r--main/sprunge/APKBUILD44
1 files changed, 21 insertions, 23 deletions
diff --git a/main/sprunge/APKBUILD b/main/sprunge/APKBUILD
index a3b51c225a..b98b3c1351 100644
--- a/main/sprunge/APKBUILD
+++ b/main/sprunge/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sprunge
-pkgver=0.5
+pkgver=0.6
pkgrel=0
pkgdesc="Helper script to paste things to http://sprunge.us"
url="http://sprunge.us"
@@ -14,51 +14,49 @@ subpackages="tpaste dpaste ix"
source=""
_builddir="$srcdir"
+
prepare() {
return 0
}
build() {
cd "$_builddir"
- cat >"$_builddir"/sprunge<<EOF
-#!/bin/sh
-
-case \${0##*/} in
- sprunge)
- exec curl -F 'sprunge=<-' http://sprunge.us;;
- tpaste)
- exec curl -F 'tpaste=<-' http://tpaste.us;;
- dpaste)
- exec curl --silent -F 'content=<-' https://dpaste.de/api/ \
- | sed -e 's/"//g' -e 's/\$/\/raw\n/';;
- ix)
- exec curl $opts -F f:1='<-' ix.io/;;
-esac
-EOF
}
package() {
cd "$_builddir"
- install -Dm755 sprunge "$pkgdir"/usr/bin/sprunge || return 1
+ mkdir -p "$pkgdir"/usr/bin
+ printf "#!/bin/sh\n\nexec curl -F 'sprunge=<-' http://sprunge.us" > \
+ "$pkgdir"/usr/bin/sprunge || return 1
+ chmod 755 "$pkgdir"/usr/bin/sprunge || return 1
}
tpaste() {
cd "$_builddir"
- pkgdesc="Alpine Linux self hosted paste service"
url="http://tpaste.us"
- install sprunge -Dm755 "$subpkgdir"/usr/bin/tpaste || return 1
+ pkgdesc="Helper script to paste things to $url"
+ mkdir -p "$subpkgdir"/usr/bin
+ printf "#!/bin/sh\n\nexec curl -F 'tpaste=<-' http://tpaste.us" > \
+ "$subpkgdir"/usr/bin/tpaste || return 1
+ chmod 755 "$subpkgdir"/usr/bin/tpaste || return 1
}
dpaste() {
cd "$_builddir"
- pkgdesc="Paste service written in python"
url="http://dpaste.com"
- install sprunge -Dm755 "$subpkgdir"/usr/bin/dpaste || return 1
+ pkgdesc="Helper script to paste things to $url"
+ mkdir -p "$subpkgdir"/usr/bin
+ printf "#!/bin/sh\n\nexec curl --silent -F 'content=<-' https://dpaste.de/api/ | sed -e 's/\"//g' -e 's/\$/\/raw\\\n/'" > \
+ "$subpkgdir"/usr/bin/dpaste || return 1
+ chmod 755 "$subpkgdir"/usr/bin/dpaste || return 1
}
ix() {
cd "$_builddir"
- pkgdesc="Command line pastebin"
url="http://ix.io"
- install sprunge -Dm755 "$subpkgdir"/usr/bin/ix || return 1
+ pkgdesc="Helper script to paste things to $url"
+ mkdir -p "$subpkgdir"/usr/bin
+ printf "#!/bin/sh\n\nexec curl -F f:1='<-' ix.io/" > \
+ "$subpkgdir"/usr/bin/ix || return 1
+ chmod 755 "$subpkgdir"/usr/bin/ix || return 1
}