X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=Makefile.am;h=7deecfec192f2c41fec351ec7246a7ad526bf3de;hb=7b76dffac06a919a15615a4b05cf36098d7822e2;hp=1fb252f94cd40077ccf5c5eb105fd54ab847452b;hpb=6838b55a7003042a101c3e939ecc812f98d7d692;p=people%2Fms%2Flibloc.git diff --git a/Makefile.am b/Makefile.am index 1fb252f..7deecfe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 @@ -42,6 +37,9 @@ LIBLOC_CURRENT=0 LIBLOC_REVISION=0 LIBLOC_AGE=0 +pythondir = $(prefix)/lib/python3/dist-packages +pyexecdir = $(prefix)/lib/python$(PYTHON_VERSION)/lib-dynload + DISTCHECK_CONFIGURE_FLAGS = \ --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) @@ -56,9 +54,12 @@ SED_PROCESS = \ -e 's,@databasedir\@,$(databasedir),g' \ < $< > $@ || rm $@ -databasedir = $(datadir)/location +databasedir = $(localstatedir)/lib/location pkgconfigdir = $(libdir)/pkgconfig +# Overwrite Python path +pkgpythondir = $(pythondir)/location + %: %.in Makefile $(SED_PROCESS) @@ -77,9 +78,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 \ @@ -145,10 +150,19 @@ EXTRA_DIST += \ 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 + pyexec_LTLIBRARIES = \ - src/python/location.la + src/python/_location.la -src_python_location_la_SOURCES = \ +src_python__location_la_SOURCES = \ src/python/locationmodule.c \ src/python/locationmodule.h \ src/python/as.c \ @@ -162,17 +176,17 @@ src_python_location_la_SOURCES = \ src/python/writer.c \ src/python/writer.h -src_python_location_la_CFLAGS = \ +src_python__location_la_CFLAGS = \ $(AM_CFLAGS) \ $(PYTHON_CFLAGS) -src_python_location_la_LDFLAGS = \ +src_python__location_la_LDFLAGS = \ $(AM_LDFLAGS) \ -shared \ -module \ -avoid-version -src_python_location_la_LIBADD = \ +src_python__location_la_LIBADD = \ src/libloc.la \ $(PYTHON_LIBS) @@ -205,7 +219,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 @@ -229,26 +243,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) @@ -258,8 +269,13 @@ 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 + +# ------------------------------------------------------------------------------ + +dist_database_DATA = \ + src/signing-key.pem # ------------------------------------------------------------------------------ @@ -274,10 +290,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 @@ -291,7 +307,8 @@ check_PROGRAMS = \ src/test-database \ src/test-as \ src/test-network \ - src/test-country + src/test-country \ + src/test-signature src_test_libloc_SOURCES = \ src/test-libloc.c @@ -347,11 +364,19 @@ src_test_database_CFLAGS = \ src_test_database_LDADD = \ src/libloc.la +src_test_signature_SOURCES = \ + src/test-signature.c + +src_test_signature_CFLAGS = \ + $(TESTS_CFLAGS) + +src_test_signature_LDADD = \ + src/libloc.la + # ------------------------------------------------------------------------------ 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)) @@ -411,9 +436,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/libloc-dev.install \ + debian/libloc.install \ + debian/libloc.lintian-overrides \ + debian/libloc.manpages \ + debian/libloc-perl.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