Magellan Linux

Contents of /branches/R11-stable/extras/firewalld/firewalld-0.3.8-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20457 - (show annotations) (download)
Mon Jan 27 09:22:42 2014 UTC (10 years, 3 months ago) by niro
File size: 4535 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="firewalld"
4 PVER="0.3.8"
5 PBUILD="r2"
6
7 SPLIT_PACKAGES="firewalld firewalld-applet firewalld-config"
8
9 PCAT="net-misc"
10 HOMEPAGE="https://fedorahosted.org/firewalld/"
11
12 COMMON_DEPEND=">= dev-lang/python-2.7
13 >= sys-apps/dbus-1.6
14 >= dev-python/dbus-python-1.2
15 >= net-misc/iptables-1.4
16 >= net-misc/ebtables-2
17 >= dev-python/python-slip-dbus-0.6"
18
19 GTK_DEPEND=">= x11-libs/gtk3+-3.10
20 >= dev-python/pygobject3-3.10"
21
22 APPLET_DEPEND=">= dev-libs/glib2-2.38
23 >= net-libs/glib-networking-2.38
24 ${GTK_DEPEND}
25 >= net-misc/networkmanager-0.9.8"
26
27 CONFIG_DEPEND="${GTK_DEPEND}
28 >= x11-themes/hicolor-icon-theme-0.12"
29
30 SDEPEND="${COMMON_DEPEND}
31 ${APPLET_DEPEND}
32 ${CONFIG_DEPEND}
33 >= dev-util/intltool-0.50
34 >= sys-dev/gettext-0.18
35 >= dev-util/pkgconfig-0.25"
36
37 SRCFILE="${PNAME}-${PVER}.tar.bz2"
38 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
39
40 sminclude gnome2 mtools systemd cleanutils xdg
41
42 SRC_URI=(
43 https://fedorahosted.org/released/${PNAME}/${SRCFILE}
44 mirror://${PNAME}/${SRCFILE}
45 mirror://${PNAME}/${PNAME}-${PVER}-confd.patch
46 mirror://${PNAME}/firewalld.service
47 )
48
49 UP2DATE="updatecmd 'https://fedorahosted.org/released/${PNAME}/?C=M;O=A' | lasttarball"
50
51 split_info_firewalld()
52 {
53 DESCRIPTION="A firewall service daemon with D-BUS interface managing a dynamic firewall."
54 DEPEND="${COMMON_DEPEND}"
55 }
56
57 split_info_firewalld-applet()
58 {
59 DESCRIPTION="Firewalld panel applet."
60 DEPEND="== net-misc/firewalld-${PVER}
61 ${APPLET_DEPEND}"
62 }
63
64 split_info_firewalld-config()
65 {
66 DESCRIPTION="Firewalld configuration interface."
67 DEPEND="== net-misc/firewalld-${PVER}
68 ${CONFIG_DEPEND}"
69 }
70
71 src_prepare()
72 {
73 munpack ${SRCFILE} || die
74 cd ${SRCDIR}
75
76 # use /etc/conf.d for service configuration
77 mpatch ${PNAME}-${PVER}-confd.patch || die
78 #mautoreconf || die
79 ./autogen.sh || die
80 }
81
82 src_compile()
83 {
84 cd ${SRCDIR}
85
86 mconfigure --with-systemd-unitdir=$(mget-systemd-unit-dir) || die
87 mmake || die
88 }
89
90 src_install_firewalld()
91 {
92 cd ${SRCDIR}
93 mmake DESTDIR=${BINDIR} install || die
94
95 # inject our firewalld.service
96 minstallunit firewalld.service || die
97
98 # fix missing dbus-alias
99 echo 'Alias=org.fedoraproject.FirewallD1.service' \
100 >> ${BINDIR}$(mget-systemd-unit-dir)/firewalld.service || die
101
102 # included with firewalld-applet
103 mdelete -r /etc/xdg || die
104 mdelete /usr/bin/firewall-applet || die
105 mdelete /usr/bin/firewall-config || die
106 mdelete -r /usr/share/applications || die
107 mdelete -r /usr/share/icons || die
108 mdelete -r /usr/share/glib-2.0 || die
109 mdelete /usr/share/man/man1/firewall-applet.1 || die
110 mdelete /usr/share/man/man1/firewall-config.1 || die
111 mdelete /usr/share/firewalld/firewall-config.glade || die
112 mdelete /usr/share/firewalld/gtk3_chooserbutton.py || die
113 minstalldocs COPYING || die
114 }
115
116 src_install_firewalld-applet()
117 {
118 cd ${SRCDIR}
119 mmake DESTDIR=${BINDIR} install || die
120
121 # fix missing desktop file
122 minstallxdg --file ${BINDIR}/etc/xdg/autostart/firewall-applet.desktop || die
123
124 zapmost ${BINDIR} \
125 etc/xdg \
126 usr/bin/firewall-applet \
127 usr/share/applications/firewall-applet.desktop \
128 usr/share/icons/hicolor/16x16/apps/firewall-applet*.* \
129 usr/share/icons/hicolor/22x22/apps/firewall-applet*.* \
130 usr/share/icons/hicolor/24x24/apps/firewall-applet*.* \
131 usr/share/icons/hicolor/32x32/apps/firewall-applet*.* \
132 usr/share/icons/hicolor/48x48/apps/firewall-applet*.* \
133 usr/share/icons/hicolor/scalable/apps/firewall-applet*.* \
134 usr/share/man/man1/firewall-applet.1 \
135 usr/share/glib-2.0/schemas/org.fedoraproject.FirewallApplet.gschema.xml \
136 || die
137 }
138
139 src_install_firewalld-config()
140 {
141 cd ${SRCDIR}
142 mmake DESTDIR=${BINDIR} install || die
143 zapmost ${BINDIR} \
144 usr/bin/firewall-config \
145 usr/share/applications/firewall-config.desktop \
146 usr/share/firewalld/firewall-config.glade \
147 usr/share/firewalld/gtk3_chooserbutton.py \
148 usr/share/icons/hicolor/16x16/apps/firewall-config*.* \
149 usr/share/icons/hicolor/22x22/apps/firewall-config*.* \
150 usr/share/icons/hicolor/24x24/apps/firewall-config*.* \
151 usr/share/icons/hicolor/32x32/apps/firewall-config*.* \
152 usr/share/icons/hicolor/48x48/apps/firewall-config*.* \
153 usr/share/icons/hicolor/scalable/apps/firewall-config*.* \
154 usr/share/man/man1/firewall-config.1 \
155 usr/share/glib-2.0/schemas/org.fedoraproject.FirewallConfig.gschema.xml \
156 || die
157 }
158
159 postinstall_firewalld()
160 {
161 mreloadunit dbus.service
162 mstartunit firewalld.service
163 }
164
165 postremove_firewalld()
166 {
167 mstopunit firewalld.service
168 mreloadunit dbus.service
169 }
170
171 postinstall_firewalld-applet()
172 {
173 gn2_postinstall || die
174 }
175
176 postremove_firewalld-applet()
177 {
178 gn2_postremove || die
179 }