X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-python%2Favahi%2FMakefile.am;h=20864c3142db263eb2acd7a127dd1bc6c368fc5e;hb=0cbaf99fc5eea82006dbc07f6c561e5d6d9cefba;hp=b1ebe22a69567a10eae8cab2019ae483c7f05c15;hpb=ced0d86acf70f435ffdadb794db891be63a5b82a;p=catta diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am index b1ebe22..20864c3 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(),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