]> git.ipfire.org Git - location/libloc.git/blobdiff - Makefile.am
Bump database version to "1"
[location/libloc.git] / Makefile.am
index 0da14165b393329e3e99e611b33fe1bd116e8917..5eae5591f32597cc7c8785004fc291280f570d9c 100644 (file)
@@ -59,6 +59,13 @@ 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
+
 %: %.in Makefile
        $(SED_PROCESS)
 
@@ -145,10 +152,17 @@ EXTRA_DIST += \
 CLEANFILES += \
        src/libloc.pc
 
+dist_pkgpython_PYTHON = \
+       src/python/__init__.py \
+       src/python/database.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
@@ -231,16 +245,19 @@ uninstall-perl:
 bin_SCRIPTS = \
        src/python/location-downloader \
        src/python/location-exporter \
+       src/python/location-importer \
        src/python/location-query
 
 EXTRA_DIST += \
        src/python/location-downloader.in \
        src/python/location-exporter.in \
+       src/python/location-importer.in \
        src/python/location-query.in
 
 CLEANFILES += \
        src/python/location-downloader \
        src/python/location-exporter \
+       src/python/location-importer \
        src/python/location-query
 
 # ------------------------------------------------------------------------------