From 6b7a29da541a591babedce459eef337473980d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Wed, 19 Aug 2015 18:14:41 +0200 Subject: [PATCH] Easy archlinux test package build --- Makefile.am | 10 ++++++++++ README.rst | 5 +++++ bootstrap | 2 +- misc/Makefile.am | 15 +-------------- misc/{PKGBUILD-git => PKGBUILD} | 0 misc/PKGBUILD.in | 28 ---------------------------- 6 files changed, 17 insertions(+), 43 deletions(-) rename misc/{PKGBUILD-git => PKGBUILD} (100%) delete mode 100644 misc/PKGBUILD.in diff --git a/Makefile.am b/Makefile.am index a17e46e..cd188d8 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 35d6934..33bcbd1 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 481d6ee..83def5e 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 a59f673..e1fdfcb 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 1fee420..0000000 --- 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: -- GitLab