summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD50
-rw-r--r--paste-binouse.install25
-rw-r--r--paste-binoused.confd1
-rw-r--r--paste-binoused.service12
5 files changed, 116 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..319de4bba546
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+# Generated by mksrcinfo v8
+# Fri Feb 19 12:56:26 UTC 2016
+pkgbase = paste-binouse-git
+ pkgdesc = paste-binouse is a standalone C++ web pastebin
+ pkgver = r70.4d0f37d
+ pkgrel = 1
+ url = http://github.com/abique/paste-binouse
+ install = paste-binouse.install
+ arch = i686
+ arch = x86_64
+ arch = armv6h
+ arch = armv7h
+ license = MIT
+ makedepends = git
+ makedepends = cmake>=2.8
+ depends = gnutls
+ backup = etc/conf.d/paste-binoused
+ source = git+https://github.com/abique/paste-binouse.git
+ source = paste-binoused.confd
+ source = paste-binouse.install
+ source = paste-binoused.service
+ md5sums = SKIP
+ md5sums = 53b10719525f897b8e82adcc6c260dec
+ md5sums = 16c1e7de70723d7ffd2de803d1bffaf3
+ md5sums = 232e99c5a358c05e45e87bfb496d29e1
+
+pkgname = paste-binouse-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..75b31e9431a0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Quentin Retornaz <quentin dot retornaz at yahoo dot fr>
+# Contributor: Alexandre Bique <bique.alexandre@gmail.com>
+
+pkgname=paste-binouse-git
+_pkgname=paste-binouse
+pkgver=r70.4d0f37d
+pkgrel=1
+pkgdesc="paste-binouse is a standalone C++ web pastebin"
+arch=('i686' 'x86_64' 'armv6h' 'armv7h')
+url="http://github.com/abique/paste-binouse"
+license=('MIT')
+makedepends=('git' 'cmake>=2.8')
+depends=('gnutls')
+options=()
+source=(git+"https://github.com/abique/paste-binouse.git"
+ "paste-binoused.confd"
+ "paste-binouse.install"
+ "paste-binoused.service")
+md5sums=('SKIP'
+ '53b10719525f897b8e82adcc6c260dec'
+ '16c1e7de70723d7ffd2de803d1bffaf3'
+ '232e99c5a358c05e45e87bfb496d29e1')
+backup=('etc/conf.d/paste-binoused')
+install='paste-binouse.install'
+
+pkgver() {
+ cd ${_pkgname}
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd ${_pkgname}
+ git submodule update --init
+}
+
+build() {
+ cd ${srcdir}/${_pkgname} &&
+ rm -rf build &&
+ mkdir build &&
+ cd build &&
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .. &&
+ make
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}/build &&
+ DESTDIR=${pkgdir} make install
+ install -Dm644 "${srcdir}"/paste-binoused.confd "${pkgdir}"/etc/conf.d/paste-binoused
+ install -Dm644 "${srcdir}"/paste-binoused.service "${pkgdir}"/usr/lib/systemd/system/paste-binoused.service
+}
diff --git a/paste-binouse.install b/paste-binouse.install
new file mode 100644
index 000000000000..38c282068d09
--- /dev/null
+++ b/paste-binouse.install
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+post_install(){
+ groupadd paste-binouse &>/dev/null
+ useradd -g paste-binouse -d /srv/paste-binouse/ -s /bin/false paste-binouse &>/dev/null
+ test -d /srv/paste-binouse || mkdir /srv/paste-binouse
+ chown paste-binouse:paste-binouse /srv/paste-binouse
+ chmod 700 /srv/paste-binouse
+ post_upgrade
+}
+
+post_upgrade(){
+ su --shell=/bin/bash \
+ --command="/usr/bin/paste-binouse-init /srv/paste-binouse" \
+ paste-binouse
+}
+
+post_remove(){
+ if getent passwd paste-binouse >/dev/null 2>&1; then
+ userdel paste-binouse
+ fi
+ if getent group paste-binouse >/dev/null 2>&1; then
+ groupdel paste-binouse
+ fi
+}
diff --git a/paste-binoused.confd b/paste-binoused.confd
new file mode 100644
index 000000000000..d1cf6a9c187b
--- /dev/null
+++ b/paste-binoused.confd
@@ -0,0 +1 @@
+PASTE_BINOUSE_ARGS="-log-level info -capacity 1073741824 -max-clients 8 -max-paste-size 524288 -ms-sleep 100 -root /srv/paste-binouse -port 11013"
diff --git a/paste-binoused.service b/paste-binoused.service
new file mode 100644
index 000000000000..5e79a2c61f40
--- /dev/null
+++ b/paste-binoused.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Paste Binouse server
+
+[Service]
+Type=simple
+EnvironmentFile=/etc/conf.d/paste-binoused
+SyslogIdentifier=paste-binoused
+ExecStart=/usr/bin/paste-binoused $PASTE_BINOUSE_ARGS
+CPUSchedulingPolicy=batch
+
+[Install]
+WantedBy=multi-user.target