Contents of /trunk/extras/firewalld/firewalld-0.2.2-r1.smage2
Parent Directory | Revision Log
Revision 11574 -
(show annotations)
(download)
Mon Mar 12 23:42:28 2012 UTC (12 years, 3 months ago) by niro
File size: 2540 byte(s)
Mon Mar 12 23:42:28 2012 UTC (12 years, 3 months ago) by niro
File size: 2540 byte(s)
-re-diffed patch
1 | # $Id$ |
2 | |
3 | PNAME="firewalld" |
4 | PVER="0.2.2" |
5 | PBUILD="r1" |
6 | |
7 | SPLIT_PACKAGES="firewalld firewalld-applet" |
8 | |
9 | PCAT="net-misc" |
10 | |
11 | DESCRIPTION="A firewall service daemon with D-BUS interface managing a dynamic firewall." |
12 | HOMEPAGE="https://fedorahosted.org/firewalld/" |
13 | |
14 | COMMON_DEPEND=">= dev-lang/python-2.7 |
15 | >= sys-apps/dbus-1.5 |
16 | >= dev-python/dbus-python-1 |
17 | >= net-misc/iptables-1.4 |
18 | >= net-misc/ebtables-2 |
19 | >= dev-python/python-slip-dbus-0.2.20" |
20 | |
21 | APPLET_DEPEND=">= dev-libs/glib2-2.30 |
22 | >= net-libs/glib-networking-2.30 |
23 | >= x11-libs/gtk2+-2.24 |
24 | >= dev-python/pygtk-2.24 |
25 | >= net-misc/networkmanager-0.9.2" |
26 | |
27 | SDEPEND="${COMMON_DEPEND} |
28 | ${APPLET_DEPEND} |
29 | >= dev-util/intltool-0.50 |
30 | >= sys-dev/gettext-0.18 |
31 | >= dev-util/pkgconfig-0.25" |
32 | |
33 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
34 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
35 | |
36 | sminclude mtools cleanutils |
37 | |
38 | SRC_URI=( |
39 | https://fedorahosted.org/released/${PNAME}/${SRCFILE} |
40 | mirror://${PNAME}/${SRCFILE} |
41 | mirror://${PNAME}/${PNAME}-${PVER}-confd.patch |
42 | mirror://${PNAME}/firewalld.service |
43 | ) |
44 | |
45 | UP2DATE="updatecmd 'https://fedorahosted.org/released/firewalld/?C=M;O=A' | lasttarball" |
46 | |
47 | split_info_firewalld() |
48 | { |
49 | DESCRIPTION="A firewall service daemon with D-BUS interface managing a dynamic firewall." |
50 | DEPEND="${COMMON_DEPEND}" |
51 | } |
52 | |
53 | split_info_firewalld-applet() |
54 | { |
55 | DESCRIPTION="Firewalld panel applet." |
56 | DEPEND="== net-misc/firewalld-${PVER} |
57 | ${APPLET_DEPEND}" |
58 | } |
59 | |
60 | src_prepare() |
61 | { |
62 | munpack ${SRCFILE} || die |
63 | cd ${SRCDIR} |
64 | |
65 | # use /etc/conf.d for service configuration |
66 | mpatch ${PNAME}-${PVER}-confd.patch || die |
67 | mautoreconf || die |
68 | } |
69 | |
70 | src_compile() |
71 | { |
72 | cd ${SRCDIR} |
73 | |
74 | mconfigure --with-systemd-unitdir=/usr/lib/systemd/system || die |
75 | mmake || die |
76 | } |
77 | |
78 | src_install_firewalld() |
79 | { |
80 | cd ${SRCDIR} |
81 | mmake DESTDIR=${BINDIR} install || die |
82 | |
83 | # inject our firewalld.service |
84 | minstallunit firewalld.service || die |
85 | |
86 | # included with firewalld-applet |
87 | rm ${BINDIR}/usr/bin/firewall-applet || die |
88 | rm -r ${BINDIR}/usr/share/applications || die |
89 | rm -r ${BINDIR}/usr/share/icons || die |
90 | rm -r ${BINDIR}/usr/share/glib-2.0 || die |
91 | minstalldocs COPYING || die |
92 | } |
93 | |
94 | src_install_firewalld-applet() |
95 | { |
96 | cd ${SRCDIR} |
97 | mmake DESTDIR=${BINDIR} install || die |
98 | zapmost ${BINDIR} \ |
99 | usr/bin/firewall-applet \ |
100 | usr/share/applications \ |
101 | usr/share/icons \ |
102 | usr/share/glib-2.0 \ |
103 | || die |
104 | } |
105 | |
106 | postinstall_firewalld() |
107 | { |
108 | if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
109 | then |
110 | glib-compile-schemas /usr/share/glib-2.0/schemas |
111 | fi |
112 | mreloadunit dbus.service |
113 | mstartunit firewalld.service |
114 | } |
115 | |
116 | postremove_firewalld() |
117 | { |
118 | mstopunit firewalld.service |
119 | mreloadunit dbus.service |
120 | } |