blob: ed055b1b71b12a9eb5ef0faa410b568024a451eb (
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
65
66
67
68
69
70
71
72
73
74
|
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sprunge
pkgver=0.6
pkgrel=2
pkgdesc="Helper script to paste things to http://sprunge.us"
url="http://sprunge.us"
arch="noarch"
license="GPL-2.0"
depends="curl"
makedepends=
install=""
subpackages="tpaste dpaste dpaste-de:dpaste_de ix"
source=""
_builddir="$srcdir"
prepare() {
return 0
}
build() {
cd "$_builddir"
}
package() {
cd "$_builddir"
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"
url="http://tpaste.us"
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"
url="http://dpaste.com"
pkgdesc="Helper script to paste things to $url"
printf > dpaste -- '%s\n' \
'#!/bin/sh' '' \
"exec curl --silent -F 'content=<-' 'http://dpaste.com/api/v2/' | sed -e 's/\$/.txt/'"
install -Dm 0755 dpaste "$subpkgdir/usr/bin/dpaste"
}
dpaste_de() {
cd "$_builddir"
url="https://dpaste.de/"
pkgdesc="Helper script to paste things to $url"
printf > dpaste-de -- '%s\n' \
'#!/bin/sh' '' \
"exec curl --silent -F 'format=url' -F 'lexer=_text' -F 'content=<-' 'https://dpaste.de/api/' | sed -e 's,\$,/raw,'"
install -Dm 0755 dpaste-de "$subpkgdir/usr/bin/dpaste-de"
}
ix() {
cd "$_builddir"
url="http://ix.io"
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
}
|