diff --git a/Makefile.am b/Makefile.am index a17e46eea72777f71ca4412fe05fb3e3b4e23a95..cd188d8d63cc8702a699415f3c63b1017957cc9e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,15 @@ SUBDIRS = src/bin src/lib/archversion misc +.PHONY: pkg test + EXTRA_DIST = COPYRIGHT LICENSE dist_doc_DATA = README.rst + +pkg: export PKGDEST = $(CURDIR) +pkg: + cd misc && makepkg + +test: export PYTHONPATH = $(CURDIR)/lib +test: + -$(CURDIR)/src/bin/archversion diff --git a/README.rst b/README.rst index 35d6934867543de6900f3d08334cff7888f08779..33bcbd161263bb911a9dbd18e382afbb9860154d 100644 --- a/README.rst +++ b/README.rst @@ -101,6 +101,11 @@ SOURCES ======= *archversion* sources are available on github [#]_. +Once you get the git tree, you can build a test package: + +| ./bootstrap +| ./configure +| make pkg LICENSE ======= diff --git a/bootstrap b/bootstrap index 481d6eeda0eb0d96f722cf29358835a6de38f249..83def5ed22b194d6f3d537cf433ece47b3d82b3c 100755 --- a/bootstrap +++ b/bootstrap @@ -1,3 +1,3 @@ #/bin/bash -autoreconf --force -v --install +autoreconf --force -v --install "$@" diff --git a/misc/Makefile.am b/misc/Makefile.am index a59f673765939f42fae24b9f4d52a5d66519719b..e1fdfcb87c8e35754a2b7bbd3c4e10976962a680 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -1,16 +1,3 @@ -noinst_SCRIPTS=PKGBUILD PKGBUILD-git -EXTRA_DIST = PKGBUILD.in $(noinst_SCRIPTS) archversion.service archversion.timer -CLEANFILES = $(noinst_SCRIPTS) - -do_substitution = sed -e 's,[@]pythondir[@],$(pythondir),g' \ - -e 's,[@]PACKAGE[@],$(PACKAGE),g' \ - -e 's,[@]VERSION[@],$(VERSION),g' - - -PKGBUILD: PKGBUILD.in - $(do_substitution) < $(srcdir)/$< > $@ +EXTRA_DIST = archversion.service archversion.timer PKGBUILD dist_doc_DATA = *.conf.example - -pkg: - makepkg -p PKGBUILD-git diff --git a/misc/PKGBUILD-git b/misc/PKGBUILD similarity index 100% rename from misc/PKGBUILD-git rename to misc/PKGBUILD diff --git a/misc/PKGBUILD.in b/misc/PKGBUILD.in deleted file mode 100644 index 1fee4202234453b47b100beb8191bdf02bcc785a..0000000000000000000000000000000000000000 --- a/misc/PKGBUILD.in +++ /dev/null @@ -1,28 +0,0 @@ -# Maintainer: Sébastien Luttringer - -pkgname=archversion -pkgver=@VERSION@ -pkgrel=1 -pkgdesc='Archlinux Version Controller' -arch=('any') -url='https://github.com/seblu/archversion' -license=('GPL2') -depends=('python' 'pyalpm' 'python-xdg' 'python-systemd') -optdepends=('abs: to sync abs tree') -source=("$pkgname-$pkgver.tar.xz") -md5sums=('SKIP') - -build() { - cd $pkgname-$pkgver - ./configure --prefix=/usr - make -} - -package() { - cd $pkgname-$pkgver - make install DESTDIR="$pkgdir" - install -Dm644 misc/archversion.service "$pkgdir/usr/lib/systemd/user/archversion.service" - install -Dm644 misc/archversion.timer "$pkgdir/usr/lib/systemd/user/archversion.timer" -} - -# vim:set ts=2 sw=2 et: