Magellan Linux

Contents of /branches/R11-stable/extras/firewalld/firewalld-0.3.3-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17920 - (show annotations) (download)
Thu Jun 27 06:29:10 2013 UTC (11 years, 4 months ago) by niro
File size: 3862 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="firewalld"
4 PVER="0.3.3"
5 PBUILD="r1"
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.4"
18
19 GTK_DEPEND=">= x11-libs/gtk3+-3.8
20 >= dev-python/pygobject3-3.8"
21
22 APPLET_DEPEND=">= dev-libs/glib2-2.36
23 >= net-libs/glib-networking-2.36
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 cleanutils
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=/usr/lib/systemd/system || 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}/usr/lib/systemd/system/firewalld.service || die
101
102 # included with firewalld-applet
103 rm ${BINDIR}/usr/bin/firewall-applet || die
104 rm -r ${BINDIR}/usr/share/applications || die
105 rm -r ${BINDIR}/usr/share/icons || die
106 rm -r ${BINDIR}/usr/share/glib-2.0 || die
107 minstalldocs COPYING || die
108 }
109
110 src_install_firewalld-applet()
111 {
112 cd ${SRCDIR}
113 mmake DESTDIR=${BINDIR} install || die
114 zapmost ${BINDIR} \
115 usr/bin/firewall-applet \
116 usr/share/applications/firewall-applet.desktop \
117 usr/share/icons/hicolor/16x16/apps/firewall-applet*.* \
118 usr/share/icons/hicolor/22x22/apps/firewall-applet*.* \
119 usr/share/icons/hicolor/24x24/apps/firewall-applet*.* \
120 usr/share/icons/hicolor/32x32/apps/firewall-applet*.* \
121 usr/share/icons/hicolor/48x48/apps/firewall-applet*.* \
122 usr/share/icons/hicolor/scalable/apps/firewall-applet*.* \
123 usr/share/glib-2.0 \
124 || die
125 }
126
127 src_install_firewalld-config()
128 {
129 cd ${SRCDIR}
130 mmake DESTDIR=${BINDIR} install || die
131 zapmost ${BINDIR} \
132 usr/bin/firewall-config \
133 usr/share/applications/firewall-config.desktop \
134 usr/share/firewalld/firewall-config.glade \
135 usr/share/icons/hicolor/16x16/apps/firewall-config*.* \
136 usr/share/icons/hicolor/22x22/apps/firewall-config*.* \
137 usr/share/icons/hicolor/24x24/apps/firewall-config*.* \
138 usr/share/icons/hicolor/32x32/apps/firewall-config*.* \
139 usr/share/icons/hicolor/48x48/apps/firewall-config*.* \
140 usr/share/icons/hicolor/scalable/apps/firewall-config*.* \
141 || die
142 }
143
144 postinstall_firewalld()
145 {
146 mreloadunit dbus.service
147 mstartunit firewalld.service
148 }
149
150 postremove_firewalld()
151 {
152 mstopunit firewalld.service
153 mreloadunit dbus.service
154 }
155
156 postinstall_firewalld-applet()
157 {
158 gn2_postinstall || die
159 }
160
161 postremove_firewalld-applet()
162 {
163 gn2_postremove || die
164 }