]> git.meshlink.io Git - catta/blob - avahi-python/avahi/Makefile.am
build-sys: actually, we need to place the service type database in lib64, not uncondi...
[catta] / avahi-python / avahi / Makefile.am
1 # This file is part of avahi.
2 #
3 # avahi is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU Lesser General Public License as
5 # published by the Free Software Foundation; either version 2 of the
6 # License, or (at your option) any later version.
7 #
8 # avahi is distributed in the hope that it will be useful, but WITHOUT
9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
11 # License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with avahi; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
16 # USA.
17
18 EXTRA_DIST = __init__.py ServiceTypeDatabase.py.in
19
20 pkglibdatadir=$(libdir)/avahi
21
22 if HAVE_PYTHON
23
24 avahidir = $(pythondir)/avahi
25
26 if HAVE_GDBM
27 nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
28
29 ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
30         $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
31                 -e 's,@DBM\@,gdbm,g' \
32                 -e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \
33                 -e 's,@CHECK_KEY\@,while key is not None:,g' \
34                 -e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \
35                 -e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \
36         chmod +x $@
37 endif
38
39 if HAVE_DBM
40 nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
41
42 ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
43         $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
44                 -e 's,@DBM\@,dbm,g' \
45                 -e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \
46                 -e 's,@CHECK_KEY\@,for key in keys:,g' \
47                 -e 's,@NEXT_KEY\@,,g' \
48                 -e 's,@pkglibdatadir\@,$(pkglibdatadir),g' $< > $@ && \
49         chmod +x $@
50 endif
51
52 avahi_PYTHON = $(avahi_SCRIPTS)
53
54 if HAVE_PYTHON_DBUS
55
56 avahi_PYTHON += __init__.py
57
58 endif
59 endif
60
61 CLEANFILES=*.pyc *.pyo ServiceTypeDatabase.py