diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | .install | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rwxr-xr-x | run.sh | 25 |
4 files changed, 17 insertions, 24 deletions
@@ -1,7 +1,7 @@ pkgbase = swish pkgdesc = SWI-Prolog for SHaring: a SWI-Prolog web IDE pkgver = r1124.071295b - pkgrel = 2 + pkgrel = 3 url = https://github.com/SWI-Prolog/swish install = .install arch = x86_64 @@ -9,6 +9,8 @@ pkgbase = swish makedepends = git makedepends = bower makedepends = sed + depends = libxinerama + depends = libxpm depends = swi-prolog-devel conflicts = swish-cplint source = git+https://github.com/SWI-Prolog/swish#branch=master @@ -6,11 +6,11 @@ post_install() { chown -R swish:swish /usr/share/swish - printf "\n\nYou can start and enable \ -swish.service to run the server.\n\n" + printf "\n\n%s\n\n" "You can start and enable \ +swish.service to run the server." } post_remove() { - printf "\n\nYou can remove swish user and group.\n\n" + printf "\n\n%s\n\n" "You can remove swish user and group." } @@ -2,12 +2,14 @@ # Contributor: Franco Masotti <franco dot masotti at student dot unife dot it> pkgname=swish pkgver=r1124.071295b -pkgrel=2 +pkgrel=3 pkgdesc="SWI-Prolog for SHaring: a SWI-Prolog web IDE" arch=('x86_64') url="https://github.com/SWI-Prolog/swish" license=('BSD') -depends=('swi-prolog-devel') +depends=('libxinerama' + 'libxpm' + 'swi-prolog-devel') makedepends=('git' 'bower' 'sed') @@ -70,7 +70,7 @@ startd() exec swipl --quiet -f "$pkg_dir"/run.pl ) & pid="$!" - } 1>/dev/null 2>/dev/null + } write_pid_file "$pid" } @@ -123,26 +123,15 @@ write_pid_file() fi } -killd() -{ - # kill action only if process exists. - if [ -f "$pid_file" ]; then - pid=$(cat "$pid_file") - ps -q $pid > /dev/null - if [ $? -eq 0 ]; then - kill -s TERM $pid - fi - fi -} - option_parser() { - getopts ":hks" opt "$@" + getopts ":hiks" opt "$@" case "$opt" in - h) help ;; - k) killd ;; - s) startd ;; - ?) help; return 1 ;; + h ) help ;; + i ) init ;; + k ) killd ;; + s ) startd ;; + ? ) help; return 1 ;; esac } |