diff --git a/PKGBUILD b/PKGBUILD index ff30e26..4473125 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,5 +1,5 @@ -# Author: Evgeniy "arcanis" Alexeev # Maintainer: Evgeniy "arcanis" Alexeev +# Author: Evgeniy "arcanis" Alexeev pkgname=queued pkgver=1.1.0 @@ -7,20 +7,13 @@ pkgrel=1 pkgdesc="Daemon for starting jobs to queue of calculations" arch=('any') url="https://github.com/arcan1s/queued" -license=("GPL") -makedeps=('git') +license=("GPLv3") +depends=('bash') source=(https://github.com/arcan1s/queued/releases/download/V.${pkgver}/${pkgname}-${pkgver}-src.tar.xz) -md5sums=('c7f710d8779e7cd780f7e8043735cae7') +md5sums=('0832ae610567e0aed4dccea02408e5a3') backup=('etc/queued.conf') package() { - # daemon - install -D -m755 "${srcdir}/${pkgname}/usr/bin/queued" "${pkgdir}/usr/bin/queued" - - # service - install -D -m644 "${srcdir}/${pkgname}/usr/lib/systemd/system/queued.service" \ - "${pkgdir}/usr/lib/systemd/system/queued.service" - install -D -m644 "${srcdir}/${pkgname}/etc/queued.conf" \ - "${pkgdir}/etc/queued.conf" + "${srcdir}/${pkgname}/install.sh" "${pkgdir}" } diff --git a/README.md b/README.md index bd2867a..d1a33da 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ Dependencies Installation ------------ * download sources -* copy source to `/`: +* run `install.sh` from source directory: - sudo cp ../queued/* / + cd queued + sudo ./install.sh "/path/to/root" diff --git a/install.sh b/install.sh index d284982..39cfebc 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,21 @@ #!/bin/bash +func_error() { + echo "Error installing" + exit 1 +} -cp -r etc / -cp -r usr / +[ -z "$1" ] && DESTDIR="/" || DESTDIR="$1" +[ -d "$DESTDIR" ] || mkdir -p "$DESTDIR" || func_error + +cd "$(dirname "${BASH_SOURCE[0]}")" +# daemon and configuration +install -D -m755 "usr/bin/queued" "$DESTDIR/usr/bin/queued" || func_error +install -D -m644 "etc/queued.conf" "$DESTDIR/etc/queued.conf" || func_error +# service +install -D -m644 "usr/lib/systemd/system/queued.service" "$DESTDIR/usr/lib/systemd/system/queued.service" || func_error +# man pages +install -D -m644 "usr/share/man/man1/queued.1" "$DESTDIR/usr/share/man/man1/queued.1" || func_error +install -D -m644 "usr/share/man/man5/queued.conf.5" "$DESTDIR/usr/share/man/man5/queued.conf.5" || func_error + +exit 0 diff --git a/queued-1.1.0-src.tar.xz b/queued-1.1.0-src.tar.xz index edf4fad..1a91479 100644 Binary files a/queued-1.1.0-src.tar.xz and b/queued-1.1.0-src.tar.xz differ diff --git a/sources/queued b/sources/queued index 54ddefe..b42f533 100755 --- a/sources/queued +++ b/sources/queued @@ -1,4 +1,22 @@ #!/bin/bash +# queued is a simple daemon for starting jobs to queue of calculations +# Copyright (C) 2013 Evgeniy Alekseev +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see http://www.gnu.org/licenses +# or write to the Free Software Foundation,Inc., 51 Franklin Street, +# Fifth Floor, Boston, MA 02110-1301 USA + # functions error_mes() {