]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - Makefile.am
network: Make lists unique
[people/ms/libloc.git] / Makefile.am
index c92ee8f8d906de0c5e95bf9a294eb2b500aa2fae..a0431a6cb7a93c57a74f5598440e538523eb6695 100644 (file)
@@ -9,11 +9,6 @@ BINDINGS =
 
 OS = $(shell uname -s)
 
-DEBIAN_TARBALL_NAME = $(PACKAGE_NAME)_$(PACKAGE_VERSION).orig.tar.xz
-
-CLEANFILES += \
-       $(DEBIAN_TARBALL_NAME)
-
 if ENABLE_PERL
 BINDINGS += perl
 endif
@@ -38,7 +33,7 @@ AM_LDFLAGS =
                -Wl,--gc-sections
  endif
 
-LIBLOC_CURRENT=0
+LIBLOC_CURRENT=1
 LIBLOC_REVISION=0
 LIBLOC_AGE=0
 
@@ -59,10 +54,6 @@ SED_PROCESS = \
 databasedir = $(localstatedir)/lib/location
 pkgconfigdir = $(libdir)/pkgconfig
 
-# XXX hardcode path for Debian
-pythondir = $(prefix)/lib/python3/dist-packages
-pyexecdir = $(prefix)/lib/python$(PYTHON_VERSION)/lib-dynload
-
 # Overwrite Python path
 pkgpythondir = $(pythondir)/location
 
@@ -84,9 +75,13 @@ AM_V_XSLT_0 = @echo "  XSLT    " $@;
 # ------------------------------------------------------------------------------
 
 .PHONY: update-po
-update-po:
+update-po: po/POTFILES.in
        $(MAKE) -C po update-po
 
+po/POTFILES.in: Makefile
+       find $(abs_srcdir)/src | \
+               grep -E "\.(in|py)$$" | sed -e "s@$(abs_srcdir)/@@g" | sort > $@
+
 EXTRA_DIST += \
        examples/private-key.pem \
        examples/public-key.pem \
@@ -153,10 +148,22 @@ CLEANFILES += \
        src/libloc.pc
 
 dist_pkgpython_PYTHON = \
-       src/python/__init__.py \
+       src/python/database.py \
+       src/python/downloader.py \
+       src/python/export.py \
        src/python/i18n.py \
+       src/python/importer.py \
        src/python/logger.py
 
+pkgpython_PYTHON = \
+       src/python/__init__.py
+
+EXTRA_DIST += \
+       src/python/__init__.py.in
+
+CLEANFILES += \
+       src/python/__init__.py
+
 pyexec_LTLIBRARIES = \
        src/python/_location.la
 
@@ -217,7 +224,7 @@ build-perl:
 
        cd $(builddir)/src/perl && $(PERL) Makefile.PL PREFIX="$(prefix)" \
                INC="-I$(abs_srcdir)/src" LIBS="-L$(abs_builddir)/src/.libs -lloc"
-       cd $(builddir)/src/perl && $(MAKE) LD_RUN_PATH=
+       cd $(builddir)/src/perl && $(MAKE) CC="$(CC)" LD="$(LD)" LD_RUN_PATH=
 
 .PHONY: check-perl
 check-perl: testdata.db
@@ -241,26 +248,23 @@ uninstall-perl:
                $(DESTDIR)/$(prefix)/man/man3/Location.3pm
 
 bin_SCRIPTS = \
-       src/python/location-downloader \
-       src/python/location-exporter \
-       src/python/location-query
+       src/python/location \
+       src/python/location-importer
 
 EXTRA_DIST += \
-       src/python/location-downloader.in \
-       src/python/location-exporter.in \
-       src/python/location-query.in
+       src/python/location.in \
+       src/python/location-importer.in
 
 CLEANFILES += \
-       src/python/location-downloader \
-       src/python/location-exporter \
-       src/python/location-query
+       src/python/location \
+       src/python/location-importer
 
 # ------------------------------------------------------------------------------
 
 if HAVE_SYSTEMD
 systemdsystemunit_DATA = \
-       src/systemd/location-downloader.service \
-       src/systemd/location-downloader.timer
+       src/systemd/location-update.service \
+       src/systemd/location-update.timer
 
 CLEANFILES += \
        $(systemdsystemunit_DATA)
@@ -270,8 +274,8 @@ INSTALL_DIRS += \
 endif
 
 EXTRA_DIST += \
-       src/systemd/location-downloader.service.in \
-       src/systemd/location-downloader.timer.in
+       src/systemd/location-update.service.in \
+       src/systemd/location-update.timer.in
 
 # ------------------------------------------------------------------------------
 
@@ -291,10 +295,10 @@ TESTS = \
        src/test-database \
        src/test-as \
        src/test-network \
-       src/test-country
+       src/test-country \
+       src/test-signature
 
 CLEANFILES += \
-       test.db \
        testdata.db
 
 testdata.db: examples/python/create-database.py
@@ -377,8 +381,7 @@ src_test_signature_LDADD = \
 # ------------------------------------------------------------------------------
 
 MANPAGES = \
-       man/location-downloader.8 \
-       man/location-query.8
+       man/location.8
 
 MANPAGES_TXT  = $(patsubst %.8,%.txt,$(MANPAGES))
 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
@@ -438,9 +441,20 @@ man/%.html: man/%.txt man/asciidoc.conf
 upload-man: $(MANPAGES_HTML)
        rsync -avHz --delete --progress $(MANPAGES_HTML) ms@fs01.haj.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/
 
-$(DEBIAN_TARBALL_NAME): dist
-       cp -v $(distdir).tar.xz $@
+EXTRA_DIST += \
+       debian/build.sh \
+       debian/changelog \
+       debian/compat \
+       debian/control \
+       debian/copyright \
+       debian/location.install \
+       debian/location.manpages \
+       debian/location-python.install \
+       debian/libloc1.install \
+       debian/libloc-dev.install \
+       debian/rules \
+       debian/source/format
 
 .PHONY: debian
-debian: $(DEBIAN_TARBALL_NAME)
-       debuild -i -us -uc -b
+debian: dist
+       $(SHELL) debian/build.sh $(PACKAGE_NAME)-$(PACKAGE_VERSION) $(distdir).tar.xz