1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2012-2013 IPFire Network Development Team #
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. #
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. #
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/>. #
19 ###############################################################################
21 PACKAGE_NAME
= network
26 # Export HTML documents to this directory.
31 sbindir
=$(prefix)/sbin
33 datadir=$(prefix)/share
37 systemdunitdir
=$(prefix)/lib
/systemd
/system
38 tmpfilesdir
=$(prefix)/lib
/tmpfiles.d
40 # File to store the version number in.
41 VERSION_FILE
= $(DESTDIR
)$(libdir)/network
/version
43 # A list of files which should be removed on "make clean"
48 man
/firewall-config
.8 \
50 man
/network-config
.8 \
51 man
/network-device
.8 \
52 man
/network-dns-server
.8 \
53 man
/network-port-batman-adv
.8 \
54 man
/network-port-batman-adv-port
.8 \
57 man
/network-zone-6rd
.8 \
58 man
/network-zone-6to4-tunnel
.8 \
59 man
/network-zone-aiccu
.8 \
60 man
/network-zone-bridge
.8 \
61 man
/network-zone-config-pppoe-server
.8 \
62 man
/network-zone-pppoe
.8 \
63 man
/network-zone-pptp
.8
65 MAN_PAGES_HTML
= $(patsubst %.xml
,%.html
,$(MAN_PAGES_XML
))
66 MAN_PAGES_XML
= $(patsubst %.8,%.xml
,$(MAN_PAGES
))
67 MAN_PAGES_8
= $(filter %.8,$(MAN_PAGES
))
77 --stringparam man.output.quietly
1 \
78 --stringparam funcsynopsis.style ansi \
79 --stringparam man.th.extra1.suppress
1 \
80 --stringparam man.authors.section.enabled
1 \
81 --stringparam man.copyright.section.enabled
1
83 XSLTPROC_COMMAND_MAN
= \
84 $(XSLTPROC
) -o
$@
$(XSLTPROC_FLAGS
) \
85 http
://docbook.sourceforge.net
/release
/xsl
/current
/manpages
/docbook.xsl
$<
87 XSLTPROC_COMMAND_HTML
= \
88 $(XSLTPROC
) -o
$@
$(XSLTPROC_FLAGS
) man
/custom-html.xsl
$<
91 $(XSLTPROC_COMMAND_MAN
)
93 man
/%.html
: man
/%.xml man
/custom-html.xsl
94 $(XSLTPROC_COMMAND_HTML
)
100 install: $(MAN_PAGES
)
101 -mkdir
-pv
$(DESTDIR
)$(sysconfdir
)/{network
/{ports
,zones
},ppp
}
102 -mkdir
-pv
$(DESTDIR
)$(libdir)/{network
,sysctl.d
,udev
}
103 -mkdir
-pv
$(DESTDIR
)$(localstatedir
)/log
/network
104 -mkdir
-pv
$(DESTDIR
)$(sbindir
)
105 -mkdir
-pv
$(DESTDIR
)$(systemdunitdir
)
106 -mkdir
-pv
$(DESTDIR
)$(tmpfilesdir
)
107 -mkdir
-pv
$(DESTDIR
)$(datadir)/firewall
109 install -m
755 -v firewall-config
$(DESTDIR
)$(sbindir
)
110 install -m
755 -v firewall6
$(DESTDIR
)$(sbindir
)
111 install -m
755 -v firewall4
$(DESTDIR
)$(sbindir
)
112 install -m
755 -v network
$(DESTDIR
)$(sbindir
)
114 cp
-rfv
{hooks
,header
*,functions
*} $(DESTDIR
)$(libdir)/network
/
115 cp
-fv sysctl.d
/* $(DESTDIR
)$(libdir)/sysctl.d
/
116 cp
-rfv udev
/* $(DESTDIR
)$(libdir)/udev
117 cp
-rfv network-
* $(DESTDIR
)$(libdir)/network
/
118 cp
-vf systemd
/*.service
$(DESTDIR
)$(systemdunitdir
)
119 cp
-vf network.tmpfiles
$(DESTDIR
)$(tmpfilesdir
)/network.conf
121 # Install the helper tools.
122 -mkdir
-pv
$(DESTDIR
)$(libdir)/network
/helpers
123 cp
-vf helpers
/* $(DESTDIR
)$(libdir)/network
/helpers
125 # Install bridge-stp.
127 $(DESTDIR
)$(libdir)/network
/helpers
/bridge-stp \
128 $(DESTDIR
)$(sbindir
)/
130 # Install dhclient script and helper.
131 install -m
755 dhclient-helper
$(DESTDIR
)$(libdir)/network
/
132 install -m
755 dhclient-script
$(DESTDIR
)$(sbindir
)/
134 install -m
755 -v ppp
/ip-updown
$(DESTDIR
)$(sysconfdir
)/ppp
135 ln
-svf ip-updown
$(DESTDIR
)$(sysconfdir
)/ppp
/ip-pre-up
136 ln
-svf ip-updown
$(DESTDIR
)$(sysconfdir
)/ppp
/ip-up
137 ln
-svf ip-updown
$(DESTDIR
)$(sysconfdir
)/ppp
/ip-down
138 ln
-svf ip-updown
$(DESTDIR
)$(sysconfdir
)/ppp
/ipv6-up
139 ln
-svf ip-updown
$(DESTDIR
)$(sysconfdir
)/ppp
/ipv6-down
140 install -m
755 -v ppp
/dialer
$(DESTDIR
)$(libdir)/network
/
142 # Install pppoe-server wrapper.
143 install -m
755 ppp
/pppoe-server
$(DESTDIR
)$(libdir)/network
/
145 # Install the firewall macros.
146 cp
-av macros
$(DESTDIR
)$(datadir)/firewall
/
148 # Create the version file.
150 echo
"# This file is automatically generated." >> $(VERSION_FILE
)
151 echo
"NETWORK_VERSION=$(PACKAGE_VERSION)" >> $(VERSION_FILE
)
154 -mkdir
-pv
$(DESTDIR
)$(mandir)/man8
155 install -v
-m
644 $(MAN_PAGES_8
) $(DESTDIR
)$(mandir)/man8
162 git archive
--format
tar --prefix $(PACKAGE_NAME
)-$(PACKAGE_VERSION
)/ HEAD | gzip
-9 > \
163 $(PACKAGE_NAME
)-$(PACKAGE_VERSION
).
tar.gz
165 .PHONY
: export-html-docs
166 export-html-docs
: $(MAN_PAGES_HTML
)
167 mkdir
-pv
$(HTML_DOCS_DIR
)
168 cp
-vf
$^
$(HTML_DOCS_DIR
)