]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - Makefile.am
countries: Fix matching invalid country codes
[people/ms/libloc.git] / Makefile.am
index 570ec3a00aa693e36d25e2c2ede103b96588ceb2..dbdfd8efcb803395fae2514a80d04968e60db346 100644 (file)
@@ -33,7 +33,7 @@ AM_LDFLAGS =
                -Wl,--gc-sections
  endif
 
-LIBLOC_CURRENT=0
+LIBLOC_CURRENT=1
 LIBLOC_REVISION=0
 LIBLOC_AGE=0
 
@@ -54,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
 
@@ -79,9 +75,14 @@ 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 -type f \( -name '*.in' -o -name '*.py' \) \
+               \! -exec git check-ignore -q {} \; -print | \
+               sed -e "s@$(abs_srcdir)/@@g" | LC_ALL=C sort > $@
+
 EXTRA_DIST += \
        examples/private-key.pem \
        examples/public-key.pem \
@@ -91,11 +92,14 @@ EXTRA_DIST += \
 pkginclude_HEADERS = \
        src/loc/libloc.h \
        src/loc/as.h \
+       src/loc/as-list.h \
        src/loc/compat.h \
        src/loc/country.h \
+       src/loc/country-list.h \
        src/loc/database.h \
        src/loc/format.h \
        src/loc/network.h \
+       src/loc/network-list.h \
        src/loc/private.h \
        src/loc/stringpool.h \
        src/loc/resolv.h \
@@ -107,9 +111,12 @@ lib_LTLIBRARIES = \
 src_libloc_la_SOURCES = \
        src/libloc.c \
        src/as.c \
+       src/as-list.c \
        src/country.c \
+       src/country-list.c \
        src/database.c \
        src/network.c \
+       src/network-list.c \
        src/resolv.c \
        src/stringpool.c \
        src/writer.c
@@ -148,12 +155,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
 
@@ -214,7 +231,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) CC="$(CC)" LD="$(LD)" LD_RUN_PATH=
+       cd $(builddir)/src/perl && $(MAKE) LD_RUN_PATH=
 
 .PHONY: check-perl
 check-perl: testdata.db
@@ -223,7 +240,7 @@ check-perl: testdata.db
 
 .PHONY: install-perl
 install-perl:
-       cd $(builddir)/src/perl && $(MAKE) install
+       cd $(builddir)/src/perl && $(MAKE) install DESTIDR=$(DESTDIR)
 
 .PHONY: clean-perl
 clean-perl:
@@ -238,29 +255,23 @@ uninstall-perl:
                $(DESTDIR)/$(prefix)/man/man3/Location.3pm
 
 bin_SCRIPTS = \
-       src/python/location-downloader \
-       src/python/location-exporter \
-       src/python/location-importer \
-       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-importer.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-importer \
-       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 +281,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
 
 # ------------------------------------------------------------------------------
 
@@ -308,6 +319,7 @@ check_PROGRAMS = \
        src/test-database \
        src/test-as \
        src/test-network \
+       src/test-network-list \
        src/test-country \
        src/test-signature
 
@@ -347,6 +359,15 @@ src_test_network_CFLAGS = \
 src_test_network_LDADD = \
        src/libloc.la
 
+src_test_network_list_SOURCES = \
+       src/test-network-list.c
+
+src_test_network_list_CFLAGS = \
+       $(TESTS_CFLAGS)
+
+src_test_network_list_LDADD = \
+       src/libloc.la
+
 src_test_stringpool_SOURCES = \
        src/test-stringpool.c
 
@@ -377,8 +398,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))
@@ -387,7 +407,7 @@ MANPAGES_XML  = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
 .PHONY: man
 man: $(MANPAGES) $(MANPAGES_HTML)
 
-if ENABLE_MANPAGES
+if ENABLE_MAN_PAGES
 man_MANS = \
        $(MANPAGES)
 endif
@@ -444,11 +464,11 @@ EXTRA_DIST += \
        debian/compat \
        debian/control \
        debian/copyright \
+       debian/location.install \
+       debian/location.manpages \
+       debian/location-python.install \
+       debian/libloc1.install \
        debian/libloc-dev.install \
-       debian/libloc.install \
-       debian/libloc.lintian-overrides \
-       debian/libloc.manpages \
-       debian/libloc-perl.install \
        debian/rules \
        debian/source/format