summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPy642015-12-20 12:41:12 +0100
committerPy642015-12-20 12:41:12 +0100
commit8cf3b00b89e65d22141750a2acf59a48aa55df7d (patch)
tree19ed5724bbec94bf3c29175ba54fb004777ce1cf
parent2b4cb913677dcdda74caf032120f9b6adb155e7f (diff)
downloadaur-8cf3b00b89e65d22141750a2acf59a48aa55df7d.tar.gz
Update to r42.4acce7f-1
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD22
-rw-r--r--httpjs.install7
-rw-r--r--httpjs.patch15
-rw-r--r--httpjs.service18
5 files changed, 21 insertions, 52 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 986f2209f08f..17fb000c54db 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Wed Dec 9 16:06:00 UTC 2015
+# Sun Dec 20 11:40:14 UTC 2015
pkgbase = httpjs-git
pkgdesc = Lightweight web server
- pkgver = r35.a4a958e
+ pkgver = r42.4acce7f
pkgrel = 1
url = https://httpjs.wolflinux.org
install = httpjs.install
@@ -11,19 +11,22 @@ pkgbase = httpjs-git
license = custom
makedepends = git
makedepends = npm
+ makedepends = sudo
+ makedepends = gcc
+ makedepends = make
depends = nodejs
depends = zlib
depends = openssl
+ depends = linux>2.6.24
+ optdepends = letsencrypt: get Let's Encrypt certificates
provides = httpjs
conflicts = httpjs
replaces = httpjs
backup = etc/httpjs/GoFile
source = git+https://github.com/HTTPjs/HTTPjs.git
- source = httpjs.patch
source = httpjs.sh
md5sums = SKIP
md5sums = SKIP
- md5sums = SKIP
pkgname = httpjs-git
diff --git a/PKGBUILD b/PKGBUILD
index 463cbc1ad9db..bd88d3303617 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,22 @@
# Maintainer: Py64 <py64.wolflinux@gmail.com>
pkgname=httpjs-git
-pkgver=r35.a4a958e
+pkgver=r42.4acce7f
pkgrel=1
pkgdesc='Lightweight web server'
arch=('i686' 'x86_64')
url='https://httpjs.wolflinux.org'
license=('custom')
-depends=('nodejs' 'zlib' 'openssl')
-makedepends=('git' 'npm')
+depends=('nodejs' 'zlib' 'openssl' 'linux>2.6.24')
+makedepends=('git' 'npm' 'sudo' 'gcc' 'make')
+optdepends=("letsencrypt: get Let's Encrypt certificates")
backup=('etc/httpjs/GoFile')
conflicts=('httpjs')
replaces=('httpjs')
provides=('httpjs')
install=httpjs.install
-source=("git+https://github.com/HTTPjs/HTTPjs.git" 'httpjs.patch' 'httpjs.sh')
-md5sums=('SKIP' 'SKIP' 'SKIP')
+source=("git+https://github.com/HTTPjs/HTTPjs.git" 'httpjs.sh')
+md5sums=('SKIP' 'SKIP')
pkgver() {
cd "$srcdir/HTTPjs"
@@ -32,9 +33,8 @@ package() {
"$pkgdir/srv/http" "$pkgdir/usr/share" "$pkgdir/usr/share/httpjs" \
"$pkgdir/usr/share/httpjs/errors" "$pkgdir/etc" "$pkgdir/etc/httpjs" \
"$pkgdir/var/lib" "$pkgdir/var/lib/httpjs" \
- "$pkgdir/var/lib/httpjs/letsencrypt-client" "$pkgdir/var/lib/httpjs/js" \
+ "$pkgdir/var/lib/httpjs/js" \
"$pkgdir/var/lib/httpjs/js/node_modules"
- patch < "$srcdir/httpjs.patch"
cp lib/*.js "$pkgdir/var/lib/httpjs/js/"
cp http.js "$pkgdir/var/lib/httpjs/httpjs"
cp "$srcdir/httpjs.sh" "$pkgdir/usr/bin/httpjs"
@@ -42,8 +42,12 @@ package() {
cp GoFile.example "$pkgdir/etc/httpjs"
cp GoFile.example "$pkgdir/etc/httpjs/GoFile"
cp public/index.html "$pkgdir/srv/http"
- cp error-pages/*.html "$pkgdir/usr/share/httpjs/errors"
-
+ cp error-pages/*.html "$pkgdir/usr/share/httpjs/errors"
+
+ echo "Fixing https://github.com/HTTPjs/HTTPjs/issues/37"
+ sudo setcap 'cap_net_bind_service=+ep' "$pkgdir/var/lib/httpjs/httpjs"
+ sudo setcap 'cap_net_bind_service=+ep' "$pkgdir/usr/bin/httpjs"
+
echo "Installing dependencies..."
npm install --prefix "$pkgdir/var/lib/httpjs/js/" stream-buffers@3.0.0 \
fastcgi-parser@0.1.x \
diff --git a/httpjs.install b/httpjs.install
index a9f4178ae609..9fd00843b633 100644
--- a/httpjs.install
+++ b/httpjs.install
@@ -1,9 +1,4 @@
post_install() {
- echo "Installing dependencies..."
- npm install -g stream-buffers@3.0.0 \
- fastcgi-parser@0.1.x \
- mmmagic@0.4.1 \
- spdy@3.0.0 \
- js-yaml@3.4.6
+ setcap 'cap_net_bind_service=+ep' /usr/bin/node
echo "You can run HTTPjs with httpjs command."
}
diff --git a/httpjs.patch b/httpjs.patch
deleted file mode 100644
index d835578efbef..000000000000
--- a/httpjs.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- http.js 2015-12-09 16:01:12.418503712 +0100
-+++ http.js.new 2015-12-09 16:02:41.956760729 +0100
-@@ -14,9 +14,9 @@
- url = require("url"),
- path = require("path"),
- iniparser = require('iniparser'),
-- php = require("./lib/php.js"),
-- out = require("./lib/out.js"),
-- fsd = require("./lib/fsaccess.js"),
-+ php = require("/var/lib/httpjs/js/php.js"),
-+ out = require("/var/lib/httpjs/js/out.js"),
-+ fsd = require("/var/lib/httpjs/js/fsaccess.js"),
- zlib = require("zlib"),
- httpserver = null,
- phpserver = null,
diff --git a/httpjs.service b/httpjs.service
deleted file mode 100644
index 76e32cb3db5e..000000000000
--- a/httpjs.service
+++ /dev/null
@@ -1,18 +0,0 @@
-[Unit]
-Description=A web server written in NodeJS
-After=network.target
-
-[Service]
-Type=forking
-PIDFile=/run/httpjs.pid
-PrivateDevices=yes
-SyslogLevel=err
-
-ExecStart=/home/py64/GIT/HTTPjs/http.js --pid /run/httpjs.pid
-ExecReload=/usr/bin/kill -HUP $MAINPID
-KillSignal=SIGQUIT
-KillMode=mixed
-
-[Install]
-WantedBy=multi-user.target
-