]> git.meshlink.io Git - catta/commitdiff
build-sys: compatibility with newer automake
authorLennart Poettering <lennart@poettering.net>
Tue, 14 Feb 2012 21:43:03 +0000 (22:43 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 14 Feb 2012 21:43:03 +0000 (22:43 +0100)
Place the service type database in $(prefix)/lib/avahi instead of
$(libdir)/avahi.

avahi-python/avahi/Makefile.am
avahi-python/avahi/ServiceTypeDatabase.py.in
avahi-ui/Makefile.am
avahi-utils/Makefile.am
service-type-database/Makefile.am

index 907c5eb133c0e23f26374381bf2a528b561b1393..081398631bdb4641144a878260b0d6a8fe74db51 100644 (file)
 
 EXTRA_DIST = __init__.py ServiceTypeDatabase.py.in
 
+pkglibdatadir=$(prefix)/lib/avahi
+
 if HAVE_PYTHON
 
 avahidir = $(pythondir)/avahi
 
-
 if HAVE_GDBM
 nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
 
@@ -31,7 +32,7 @@ ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
                -e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \
                -e 's,@CHECK_KEY\@,while key is not None:,g' \
                -e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \
-               -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \
+               -e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \
        chmod +x $@
 endif
 
@@ -44,7 +45,7 @@ ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
                -e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \
                -e 's,@CHECK_KEY\@,for key in keys:,g' \
                -e 's,@NEXT_KEY\@,,g' \
-               -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \
+               -e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \
        chmod +x $@
 endif
 
index 8ad8d5edbd91ce21b9a467ee7b3e6bcb06313c74..b2035fdf6b5089c0e604522a2e0174d7ea7f9e1c 100644 (file)
@@ -26,7 +26,7 @@ locale.setlocale(locale.LC_ALL, '')
 class ServiceTypeDatabase:
     """ServiceTypeDatabase maps service types to descriptions"""
 
-    def __init__(self, filename = "@pkglibdir@/service-types.db"):
+    def __init__(self, filename = "@pkglibdatadir@/service-types.db"):
 
         self.db = @DBM@.open(filename, "r")
 
@@ -46,13 +46,13 @@ class ServiceTypeDatabase:
             if i >= 0:
 
                 k = l[0][:i]
-                
+
                 if not l[1] is None:
                     self.suffixes += (k + "@" + l[1], )
 
                 self.suffixes += (k, )
-            
-            
+
+
         self.suffixes = tuple(map(lambda x:  "["+x+"]", self.suffixes)) + ("", )
 
     def __getitem__(self, key):
@@ -75,7 +75,7 @@ class ServiceTypeDatabase:
 
             if self.db.has_key(key + suffix):
                 return True
-            
+
         return False
 
     def __contains__(self, item):
@@ -86,7 +86,7 @@ class ServiceTypeDatabase:
                 return True
 
         return False
-        
+
 
     def __iter__(self):
 
@@ -134,9 +134,9 @@ class ServiceTypeDatabase:
     def values(self):
 
         return list(self.itervalues())
-        
+
 if __name__ == "__main__":
-    
+
     b = ServiceTypeDatabase()
     print b.items()
 
index 72d60239a81a1488a3641364b0f91aef1d845735..bb0f64730981c1ad6556266bd0e606c573f610cf 100644 (file)
@@ -20,6 +20,8 @@ AM_CFLAGS=-I$(top_srcdir) -DG_DISABLE_DEPRECATED=1 -DGDK_DISABLE_DEPRECATED=1 -D
 # This cool debug trap works on i386/gcc only
 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
 
+pkglibdatadir=$(prefix)/lib/avahi
+
 desktopdir = $(datadir)/applications
 desktop_DATA =
 desktop_DATA_in = $(desktop_DATA_in_in:.in.in=.in)
@@ -62,18 +64,18 @@ libavahi_ui_gtk3_la_LDFLAGS = $(AM_LDFLAGS)  -version-info $(LIBAVAHI_UI_VERSION
 
 if HAVE_GDBM
 libavahi_ui_la_SOURCES += ../avahi-utils/stdb.h ../avahi-utils/stdb.c
-libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdatadir)/service-types.db\"
 libavahi_ui_la_LIBADD += -lgdbm
 
-libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdatadir)/service-types.db\"
 libavahi_ui_gtk3_la_LIBADD += -lgdbm
 endif
 
 if HAVE_DBM
 libavahi_ui_la_SOURCES += ../avahi-utils/stdb.h ../avahi-utils/stdb.c
-libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+libavahi_ui_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdatadir)/service-types.db\"
 
-libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+libavahi_ui_gtk3_la_CFLAGS += -DDATABASE_FILE=\"$(pkglibdatadir)/service-types.db\"
 endif
 
 bin_PROGRAMS = bssh
index 1b0443cb949d7f98b729d13eb4ff8414c1f66f77..a1fc3a54930b5d1806a8af25873476fa1a4aa72b 100644 (file)
@@ -20,6 +20,8 @@ AM_CFLAGS=-I$(top_srcdir)
 # This cool debug trap works on i386/gcc only
 AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
 
+pkglibdatadir=$(prefix)/lib/avahi
+
 if HAVE_DBUS
 
 bin_PROGRAMS = avahi-browse avahi-resolve avahi-publish avahi-set-host-name
@@ -30,13 +32,13 @@ avahi_browse_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-com
 
 if HAVE_GDBM
 avahi_browse_SOURCES += stdb.h stdb.c
-avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdatadir)/service-types.db\"
 avahi_browse_LDADD += -lgdbm
 endif
 
 if HAVE_DBM
 avahi_browse_SOURCES += stdb.h stdb.c
-avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdir)/service-types.db\"
+avahi_browse_CFLAGS += -DDATABASE_FILE=\"$(pkglibdatadir)/service-types.db\"
 endif
 
 avahi_resolve_SOURCES = avahi-resolve.c sigint.c sigint.h
index fa1bd404619169f33156c9cedb890d8b1de5f800..1e9e70f9e89054a9709d4b7cd68dcd2fb2dcce9d 100644 (file)
 
 EXTRA_DIST=build-db.in service-types
 
+pkglibdatadir=$(prefix)/lib/avahi
+
 pkgdata_DATA=service-types
-pkglib_DATA=
+pkglibdata_DATA=
 
 if HAVE_PYTHON
 if HAVE_GDBM
 
 noinst_SCRIPTS=build-db
-pkglib_DATA+=service-types.db
+pkglibdata_DATA+=service-types.db
 
 build-db: build-db.in
        $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
@@ -41,7 +43,7 @@ endif
 if HAVE_DBM
 
 noinst_SCRIPTS=build-db
-pkglib_DATA+=service-types.db.pag service-types.db.dir
+pkglibdata_DATA+=service-types.db.pag service-types.db.dir
 
 build-db: build-db.in
        $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \