]>
Commit | Line | Data |
---|---|---|
3fdcb9d1 MT |
1 | ############################################################################### |
2 | # # | |
dc11f1ea MT |
3 | # Pakfire - The IPFire package management system # |
4 | # Copyright (C) 2013 Pakfire development team # | |
3fdcb9d1 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | ############################################################################### | |
f22ab085 | 20 | |
dc11f1ea MT |
21 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} |
22 | AM_MAKEFLAGS = --no-print-directory | |
23 | AUTOMAKE_OPTIONS = color-tests | |
f22ab085 | 24 | |
dc11f1ea MT |
25 | # remove target it the command fails |
26 | .DELETE_ON_ERROR: | |
f22ab085 | 27 | |
dc11f1ea MT |
28 | # keep itermediate files |
29 | .SECONDARY: | |
f22ab085 | 30 | |
dc11f1ea | 31 | SUBDIRS = . po |
f22ab085 | 32 | |
dc11f1ea | 33 | pythondir = $(pyexecdir) |
f22ab085 | 34 | |
dc11f1ea | 35 | configsdir = $(sysconfdir)/ddns |
f22ab085 | 36 | |
dc11f1ea MT |
37 | CLEANFILES = |
38 | DISTCLEANFILES = | |
39 | EXTRA_DIST = | |
673f2c74 | 40 | INSTALL_DIRS = |
2443dd94 | 41 | noinst_DATA = |
f22ab085 | 42 | |
dc11f1ea | 43 | @INTLTOOL_POLICY_RULE@ |
f22ab085 | 44 | |
dc11f1ea MT |
45 | .PHONY: update-po |
46 | update-po: | |
47 | $(MAKE) -C po update-po | |
f22ab085 | 48 | |
673f2c74 SS |
49 | DISTCHECK_CONFIGURE_FLAGS = \ |
50 | --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) | |
51 | ||
dc11f1ea | 52 | # ------------------------------------------------------------------------------ |
f22ab085 | 53 | |
2443dd94 SS |
54 | AM_V_XSLT = $(AM_V_XSLT_$(V)) |
55 | AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY)) | |
56 | AM_V_XSLT_0 = @echo " XSLT " $@; | |
57 | ||
58 | # ------------------------------------------------------------------------------ | |
59 | ||
dc11f1ea MT |
60 | dist_doc_DATA = \ |
61 | COPYING | |
62 | ||
63 | # ------------------------------------------------------------------------------ | |
64 | ||
0b5e00a2 MT |
65 | bin_SCRIPTS = \ |
66 | ddns | |
67 | ||
68 | EXTRA_DIST += \ | |
69 | ddns.in | |
70 | ||
71 | CLEANFILES += \ | |
dc11f1ea MT |
72 | ddns |
73 | ||
74 | dist_configs_DATA = \ | |
677765c0 | 75 | ddns.conf.sample |
dc11f1ea MT |
76 | |
77 | ddns_PYTHON = \ | |
78 | src/ddns/__init__.py \ | |
79 | src/ddns/__version__.py \ | |
37e24fbf | 80 | src/ddns/database.py \ |
dc11f1ea MT |
81 | src/ddns/errors.py \ |
82 | src/ddns/i18n.py \ | |
83 | src/ddns/providers.py \ | |
84 | src/ddns/system.py | |
85 | ||
86 | ddnsdir = $(pythondir)/ddns | |
0b5e00a2 MT |
87 | |
88 | # ------------------------------------------------------------------------------ | |
89 | ||
d7d1febe MT |
90 | .PHONY: man |
91 | man: $(MANPAGES) $(MANPAGES_HTML) | |
92 | ||
2443dd94 SS |
93 | if ENABLE_MANPAGES |
94 | MANPAGES = \ | |
95 | man/ddns.1 \ | |
96 | man/ddns.conf.5 | |
97 | ||
98 | MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES))) | |
99 | MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML)) | |
100 | ||
2443dd94 SS |
101 | man_MANS = \ |
102 | $(MANPAGES) | |
103 | ||
104 | noinst_DATA += \ | |
105 | $(MANPAGES_HTML) | |
106 | ||
107 | CLEANFILES += \ | |
108 | $(man_MANS) \ | |
109 | $(MANPAGES_HTML) | |
110 | ||
111 | EXTRA_DIST += \ | |
112 | $(MANPAGES_XML) \ | |
113 | man/custom-html.xsl | |
114 | ||
115 | XSLTPROC_FLAGS = \ | |
116 | --nonet \ | |
117 | --stringparam man.output.quietly 1 \ | |
118 | --stringparam funcsynopsis.style ansi \ | |
119 | --stringparam man.th.extra1.suppress 1 \ | |
120 | --stringparam man.authors.section.enabled 1 \ | |
121 | --stringparam man.copyright.section.enabled 1 | |
122 | ||
123 | XSLTPROC_COMMAND_MAN = \ | |
124 | $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ | |
125 | http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< | |
126 | ||
127 | XSLTPROC_COMMAND_HTML = \ | |
128 | $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< | |
129 | ||
130 | man/%.1: man/%.xml | |
131 | $(XSLTPROC_COMMAND_MAN) | |
132 | ||
133 | man/%.5: man/%.xml | |
134 | $(XSLTPROC_COMMAND_MAN) | |
135 | ||
136 | man/%.html: man/%.xml man/custom-html.xsl | |
137 | $(XSLTPROC_COMMAND_HTML) | |
138 | ||
139 | endif | |
140 | ||
141 | # ------------------------------------------------------------------------------ | |
142 | ||
673f2c74 SS |
143 | if HAVE_SYSTEMD |
144 | systemdsystemunit_DATA = \ | |
145 | src/systemd/ddns.service \ | |
146 | src/systemd/ddns.timer | |
147 | ||
148 | CLEANFILES += \ | |
149 | $(systemdsystemunit_DATA) | |
150 | ||
151 | INSTALL_DIRS += \ | |
152 | $(systemdsystemunitdir) | |
153 | endif | |
154 | ||
155 | EXTRA_DIST += \ | |
156 | src/systemd/ddns.service.in \ | |
157 | src/systemd/ddns.timer | |
158 | ||
159 | # ------------------------------------------------------------------------------ | |
160 | ||
0b5e00a2 MT |
161 | substitutions = \ |
162 | '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ | |
163 | '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ | |
673f2c74 SS |
164 | '|configsdir=$(configsdir)|' \ |
165 | '|bindir=$(bindir)|' | |
0b5e00a2 MT |
166 | |
167 | SED_PROCESS = \ | |
168 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
169 | $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ | |
170 | < $< > $@ | |
171 | ||
172 | ddns: ddns.in Makefile | |
173 | $(SED_PROCESS) | |
673f2c74 SS |
174 | |
175 | src/systemd/%: src/systemd/%.in Makefile | |
176 | $(SED_PROCESS) |