blob: a3b51c225a5710fca7d618ec99ebc51eb0f0684b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sprunge
pkgver=0.5
pkgrel=0
pkgdesc="Helper script to paste things to http://sprunge.us"
url="http://sprunge.us"
arch="noarch"
license="GPLv2"
depends="curl"
makedepends=
install=""
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
}
tpaste() {
cd "$_builddir"
pkgdesc="Alpine Linux self hosted paste service"
url="http://tpaste.us"
install sprunge -Dm755 "$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
}
ix() {
cd "$_builddir"
pkgdesc="Command line pastebin"
url="http://ix.io"
install sprunge -Dm755 "$subpkgdir"/usr/bin/ix || return 1
}
|