diff options
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | config.patch | 39 |
3 files changed, 62 insertions, 7 deletions
@@ -1,16 +1,19 @@ # Generated by mksrcinfo v8 -# Tue Nov 14 08:37:07 UTC 2017 +# Sun Aug 19 11:50:57 UTC 2018 pkgbase = privatebin pkgdesc = a minimalist, open source online pastebin where the server has zero knowledge of pasted data - pkgver = 1.1 + pkgver = 1.2.1 pkgrel = 1 url = https://privatebin.info arch = any license = zlib depends = php depends = php-gd - source = privatebin-1.1.tar.gz::https://github.com/PrivateBin/PrivateBin/archive/1.1.tar.gz - md5sums = 623be6c7f72f13d4269999941fed18d9 + options = emptydirs + source = privatebin-1.2.1.tar.gz::https://github.com/PrivateBin/PrivateBin/archive/1.2.1.tar.gz + source = config.patch + md5sums = 8a481d83f43a421f56f147b90488a7b7 + md5sums = 714f59731b65989547fd590fa321811b pkgname = privatebin @@ -1,13 +1,21 @@ pkgname=privatebin -pkgver=1.1 +pkgver=1.2.1 pkgrel=1 pkgdesc="a minimalist, open source online pastebin where the server has zero knowledge of pasted data" url='https://privatebin.info' arch=("any") license=("zlib") depends=("php" "php-gd") -source=("$pkgname-$pkgver.tar.gz::https://github.com/PrivateBin/PrivateBin/archive/$pkgver.tar.gz") -md5sums=('623be6c7f72f13d4269999941fed18d9') +options=("emptydirs") +source=("$pkgname-$pkgver.tar.gz::https://github.com/PrivateBin/PrivateBin/archive/$pkgver.tar.gz" + "config.patch") +md5sums=('8a481d83f43a421f56f147b90488a7b7' + '912b477a3d0c7505111bbe17c3901f4a') + +prepare(){ + cd PrivateBin-$pkgver/cfg + patch conf.sample.php ../../config.patch +} package(){ cd PrivateBin-$pkgver @@ -17,4 +25,9 @@ package(){ mkdir -p "$pkgdir/etc/webapps/" mv "$pkgdir/usr/share/webapps/$pkgname/cfg" "$pkgdir/etc/webapps/$pkgname/" ln -s /etc/webapps/$pkgname "$pkgdir/usr/share/webapps/$pkgname/cfg" + # data and runtime folders + for folder in model purgelimit trafficlimits; + do + mkdir -p "$pkgdir/var/lib/$pkgname/$folder" + done } diff --git a/config.patch b/config.patch new file mode 100644 index 000000000000..2dd9c8a64b16 --- /dev/null +++ b/config.patch @@ -0,0 +1,39 @@ +diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php +index 28dae77..8028191 100644 +--- a/cfg/conf.sample.php ++++ b/cfg/conf.sample.php +@@ -111,7 +111,7 @@ limit = 10 + ; header = "X_FORWARDED_FOR" + + ; directory to store the traffic limits in +-dir = PATH "data" ++dir = "/var/lib/privatebin/trafficlimits" + + [purge] + ; minimum time limit between two purgings of expired pastes, it is only +@@ -125,14 +125,14 @@ limit = 300 + batchsize = 10 + + ; directory to store the purge limit in +-dir = PATH "data" ++dir = "/var/lib/privatebin/purgelimit" + + [model] + ; name of data model class to load and directory for storage + ; the default model "Filesystem" stores everything in the filesystem + class = Filesystem + [model_options] +-dir = PATH "data" ++dir = "/var/lib/privatebin/model" + + ;[model] + ; example of DB configuration for MySQL +@@ -148,7 +148,7 @@ dir = PATH "data" + ; example of DB configuration for SQLite + ;class = Database + ;[model_options] +-;dsn = "sqlite:" PATH "data/db.sq3" ++;dsn = "sqlite:" "/var/lib/privatebin/data/db.sq3" + ;usr = null + ;pwd = null + ;opt[12] = true ; PDO::ATTR_PERSISTENT |