X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-python%2Favahi%2FMakefile.am;h=db604bced36e9fad4a42be5368ce7830d8525f03;hb=d6d26305ce18b43a220d17651b081a2d72f84119;hp=b1ebe22a69567a10eae8cab2019ae483c7f05c15;hpb=ced0d86acf70f435ffdadb794db891be63a5b82a;p=catta diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am index b1ebe22..db604bc 100644 --- a/avahi-python/avahi/Makefile.am +++ b/avahi-python/avahi/Makefile.am @@ -23,12 +23,32 @@ if HAVE_PYTHON avahidir = $(pythondir)/avahi + +if HAVE_GDBM +avahi_SCRIPTS = ServiceTypeDatabase.py + +ServiceTypeDatabase.py: ServiceTypeDatabase.py.in + sed -e 's,@PYTHON\@,$(PYTHON),g' \ + -e 's,@DBM\@,gdbm,g' \ + -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,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ + chmod +x $@ +endif + +if HAVE_DBM avahi_SCRIPTS = ServiceTypeDatabase.py ServiceTypeDatabase.py: ServiceTypeDatabase.py.in sed -e 's,@PYTHON\@,$(PYTHON),g' \ + -e 's,@DBM\@,dbm,g' \ + -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,@pkgdatadir\@,$(pkgdatadir),g' $< > $@ chmod +x $@ +endif if HAVE_PYGTK if HAVE_PYTHON_DBUS