diff options
author | Simon Hanna | 2015-06-08 15:16:43 +0200 |
---|---|---|
committer | Simon Hanna | 2015-06-08 15:16:43 +0200 |
commit | a9aeea5b3b4d92bc6afea9826c9261afff3167ec (patch) | |
tree | 276008eacc6a17dae0f77d09ab84be242bf00857 | |
download | aur-a9aeea5b3b4d92bc6afea9826c9261afff3167ec.tar.gz |
Import filebin v 0.9.2
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | filebin-nginx.conf | 64 | ||||
-rw-r--r-- | filebin.install | 16 |
4 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b7ba1485115b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = filebin + pkgdesc = A pastebin service written in PHP + pkgver = 0.9.2 + pkgrel = 1 + url = https://wiki.server-speed.net/projects/filebin + install = filebin.install + arch = any + license = AGPL + depends = php + depends = pygmentize + depends = perl-text-markdown + depends = python-ansi2html + depends = php-gd + depends = imagemagick + depends = qrencode + options = !strip + options = emptydirs + backup = etc/webapps/filebin/config-local.php + backup = etc/webapps/filebin/contact-info.php + backup = etc/webapps/filebin/database.php + backup = etc/webapps/filebin/memcached.php + source = https://github.com/Bluewind/filebin/archive/0.9.2.tar.gz + source = filebin-nginx.conf + sha256sums = SKIP + sha256sums = 5500d423d798478bf4f7bb0a147fe8a42b00e843513dd70665ec81f304a6c729 + +pkgname = filebin + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ba1469798e11 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Simon Hanna<simon DOT Hanna AT serve-me DOT info> +pkgname=filebin +pkgver=0.9.2 +pkgrel=1 +pkgdesc="A pastebin service written in PHP" +arch=('any') +url="https://wiki.server-speed.net/projects/filebin" +license=('AGPL') + +depends=('php' + 'pygmentize' + 'perl-text-markdown' + 'python-ansi2html' + 'php-gd' + 'imagemagick' + 'qrencode' +) +backup=('etc/webapps/filebin/config-local.php' + 'etc/webapps/filebin/contact-info.php' + 'etc/webapps/filebin/database.php' + 'etc/webapps/filebin/memcached.php' +) +install=filebin.install +options=('!strip' 'emptydirs') +source=("https://github.com/Bluewind/filebin/archive/${pkgver}.tar.gz" + 'filebin-nginx.conf' +) +sha256sums=('SKIP' + '5500d423d798478bf4f7bb0a147fe8a42b00e843513dd70665ec81f304a6c729') + +package() { + mkdir -p ${pkgdir}/usr/share/webapps + mkdir -p ${pkgdir}/etc/webapps/filebin + cp -ra ${srcdir}/filebin/ ${pkgdir}/usr/share/webapps/filebin/ + cp filebin-nginx.conf ${pkgdir}/usr/share/webapps/filebin + cd ${pkgdir}/usr/share/webapps/filebin + cp application/config/example/{config-local,database,memcached}.php ${pkgdir}/etc/webapps/filebin + ln -s /etc/webapps/filebin/{config-local,database,memcached}.php application/config + cp data/local/examples/contact-info.php ${pkgdir}/etc/webapps/filebin + ln -s /etc/webapps/filebin/contact-info.php data/local + + # removing unnecessary data for a production environment + rm -rf .git + rm -rf application/third_party/{test-more-php,mockery} + rm -rf application/tests + find . -name \*.gitignore -type f -delete +} diff --git a/filebin-nginx.conf b/filebin-nginx.conf new file mode 100644 index 000000000000..8333a193b25f --- /dev/null +++ b/filebin-nginx.conf @@ -0,0 +1,64 @@ +## http server redirecting to https +server { + listen 80; + server_name example.com; + + return 301 https://$server_name$request_uri; +} + +## sample http server, if no https is being used, if you use this comment the https server section +#server { +# listen 80; +# server_name example.com; + + +# root /usr/share/webapps/filebin; +# index index.php index.html index.htm; + +# location / { +# # First attempt to serve request as file, then +# # as directory, then fall back to displaying a 404. +# try_files $uri $uri/ /index.php /index.html; +# } +# location ~ ^(.+\.php)(.*)$ { +# try_files $fastcgi_script_name =404; +# fastcgi_split_path_info ^(.+\.php)(.*)$; +# fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; +# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; +# fastcgi_param PATH_INFO $fastcgi_path_info; +# include /etc/nginx/fastcgi_params; +# } +#} + +## Config for server secured with https +server { + listen 443; + + root /usr/share/webapps/filebin; + index index.php index.html index.htm; + + server_name example.com; + + + ssl on; + ssl_certificate certificate.crt; + ssl_certificate_key private-key.key; + ssl_session_timeout 5m; + ssl_ciphers 'AES128+EECDH:AES128+EDH'; + ssl_prefer_server_ciphers on; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ /index.php /index.html; + } + location ~ ^(.+\.php)(.*)$ { + try_files $fastcgi_script_name =404; + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + include /etc/nginx/fastcgi_params; + } +} + diff --git a/filebin.install b/filebin.install new file mode 100644 index 000000000000..40640042d404 --- /dev/null +++ b/filebin.install @@ -0,0 +1,16 @@ +post_install() { + echo "-------------------------------------------------------------------------------" + echo "run install.php to make sure all dependecies are installed" + echo "update 'open_base_dir' in php's config to include '/usr/share/webapps/filebin' and + '/etc/webapps/filebin'" + echo "enable exif, phar and any of mysql, mysqli, pgsql, pdo_mysql or pdo_pgsql for database access" + echo "edit the files in '/etc/webapps/filebin'" + echo "do not edit config.php! use config-local.php to override it when needed" + echo "add '/usr/share/webapps/filebin/crontab' to the user's crontab" + echo "run 'php index.php tools update_database' to initialize your database'" + echo "run 'php index.php user add_user' to add your first user" + echo "additional information can be found in '/usr/share/webapps/filebin/INSTALL'" + echo "there is a sample nginx configuration file in '/usr/share/webapps/filebin'" + echo "-------------------------------------------------------------------------------" + +} |