Skip to content
Snippets Groups Projects
Commit debe53cd authored by ale's avatar ale
Browse files

drop libleveldb dependency from Debian package metadata

parent bd8eccf0
Branches
No related tags found
No related merge requests found
liber (0.2) unstable; urgency=medium
* Migrated to new on-disk database format.
-- ale <ale@incal.net> Sat, 13 Feb 2016 13:00:07 +0000
liber (0.1p6) unstable; urgency=medium
* Fixed issues with user input.
......
......@@ -2,13 +2,13 @@ Source: liber
Section: net
Priority: extra
Maintainer: ale <ale@incal.net>
Build-Depends: debhelper (>= 8.0.0), libicu-dev, libleveldb-dev (>=1.15)
Build-Depends: debhelper (>= 8.0.0), dh-systemd (>= 1.5)
Standards-Version: 3.9.4
Homepage: https://git.autistici.org/ale/liber
Package: liber
Architecture: any
Depends: libleveldb1 (>=1.15), libicu48, ${shlibs:Depends}, ${misc:Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Ebook collection indexer.
Index and search an ebook collection.
......@@ -3,7 +3,11 @@
#ENABLE_SERVER=true
# Set the address (host:port) to listen on.
#ADDR=:4040
ADDR="--http-server=127.0.0.1:4040"
# Directory where books are stored.
#BOOK_DIR=/var/lib/liber/books
BOOK_DIR="--book-dir=/var/lib/liber/books"
# Put any other options here.
LIBER_OPTIONS=
......@@ -56,13 +56,13 @@ case "$1" in
stop)
do_stop
;;
restart)
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}" >&2
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
......
......@@ -18,14 +18,14 @@ esac
#DEBHELPER#
adduser --quiet --system --home /var/lib/liber --no-create-home --ingroup nogroup liber
if ! getent passwd liber >/dev/null; then
useradd --system --home-dir /var/lib/liber -M liber
fi
for dir in /var/lib/liber /var/lib/liber/books; do
test -d $dir || mkdir $dir
chmod 700 $dir
chown liber:nogroup $dir
chown liber $dir
done
update-rc.d liber defaults >/dev/null
exit 0
[Unit]
Description=Ebook collection indexer
After=network.target
[Service]
User=liber
EnvironmentFile=/etc/default/liber
ExecStart=/usr/bin/liber $BOOK_DIR $ADDR $LIBER_OPTIONS
Restart=always
[Install]
WantedBy=multi-user.target
......@@ -7,17 +7,29 @@
# This has to be exported to make some magic below work.
export DH_OPTIONS
export DH_GOPKG = git.autistici.org/ale/liber
DEBDIR = $(CURDIR)/debian
PKGDIR = $(DEBDIR)/liber
%:
dh $@
dh $@ --with systemd
override_dh_install:
# Build the sources using your locally-installed Go version.
# This is crazy, clearly, but it's a temporary workaround for wheezy.
# NB: This is not an acceptable way to build a proper Debian package.
install -m 755 -o root -g root -d $(PKGDIR)/usr/bin
install -m 755 -o root -g root -d $(PKGDIR)/usr/share/liber
go build -o $(PKGDIR)/usr/bin/liber cmd/liber/liber.go
-mkdir build
(export PATH=$$PATH:/usr/local/go/bin ; export GOPATH=$(CURDIR)/build ; mkdir -p build/src/$(shell dirname $(DH_GOPKG)) ; ln -s $(CURDIR) build/src/$(DH_GOPKG) ; cd build/src/$(DH_GOPKG) && go install -v ./...)
(for f in liber liberdbtool ; do \
install -m 755 -o root -g root build/bin/$$f $(PKGDIR)/usr/bin/$$f ; done)
(umask 022; cp -R --preserve=timestamps htdocs $(PKGDIR)/usr/share/liber/htdocs)
override_dh_clean:
-rm -fr build
dh_clean
# Do not enable the liber HTTP server by default.
override_dh_systemd_enable:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment