Logoj0ke.net Open Build Service > Projects > home:jg:dns > ndjbdns > Changes
Sign Up | Log In

Changes of Revision 2

[-] Changed ndjbdns.spec
x
 
1
@@ -12,30 +12,7 @@
2
 
3
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
4
 
5
-%if 0%{?fedora} || 0%{?rhel} >= 7
6
-Requires:       pkgconfig
7
-BuildRequires:  systemd-units
8
-%endif
9
-
10
-%if 0%{?fedora} == 16 || 0%{?fedora} == 17
11
-Requires(post):     systemd-units
12
-Requires(preun):    systemd-units
13
-Requires(postun):   systemd-units
14
-%endif
15
-
16
-%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
17
-Requires(post):     systemd-sysv
18
-Requires(post):     systemd
19
-Requires(preun):    systemd
20
-Requires(postun):   systemd
21
-%endif
22
-
23
-%if 0%{?rhel} == 5 || 0%{?rhel} == 6
24
-Requires(post):     /sbin/chkconfig
25
-Requires(preun):    /sbin/chkconfig
26
-Requires(preun):    /sbin/service
27
-Requires(postun):   /sbin/service
28
-%endif
29
+BuildRequires: make automake gcc gcc-c++ autoconf openssl-devel
30
 
31
 %description
32
 New djbdns: is a usable fork of djbdns. `djbdns' is a Domain Name System
33
@@ -61,22 +38,13 @@
34
 rm -rf $RPM_BUILD_ROOT
35
 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
36
 
37
-%if 0%{?rhel} == 5 || 0%{?rhel} == 6
38
 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/
39
 mv ndjbdns.logrotate $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/ndjbdns
40
-%endif
41
 
42
 
43
 %clean
44
 rm -rf $RPM_BUILD_ROOT
45
 
46
-%if 0%{?fedora} == 16 || 0%{?fedora} == 17
47
-
48
-%post
49
-if [ $1 -eq 1 ]; then
50
-    # Initial installation
51
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
52
-fi
53
 
54
 # remove old files from earlier installation, because these files
55
 # are moved to `../sbin/' and `../man8/' directories.
56
@@ -93,64 +61,6 @@
57
 [ -f %{_mandir}/man1/tinydns.1.gz ]  && rm %{_mandir}/man1/tinydns.1.gz
58
 [ -f %{_mandir}/man1/walldns.1.gz ]  && rm %{_mandir}/man1/walldns.1.gz
59
 
60
-%preun
61
-if [ $1 -eq 0 ]; then
62
-    # Package removal, not upgrade
63
-    /sbin/systemctl --no-reload disable axfrdns.service > /dev/null 2>&1 || :
64
-    /sbin/systemctl stop axfrdns.service > /dev/null 2>&1 || :
65
-
66
-    /sbin/systemctl --no-reload disable dnscache.service > /dev/null 2>&1 || :
67
-    /sbin/systemctl stop dnscache.service > /dev/null 2>&1 || :
68
-
69
-    /sbin/systemctl --no-reload disable rbldns.service > /dev/null 2>&1 || :
70
-    /sbin/systemctl stop rbldns.service > /dev/null 2>&1 || :
71
-
72
-    /sbin/systemctl --no-reload disable tinydns.service > /dev/null 2>&1 || :
73
-    /sbin/systemctl stop tinydns.service > /dev/null 2>&1 || :
74
-
75
-    /sbin/systemctl --no-reload disable walldns.service > /dev/null 2>&1 || :
76
-    /sbin/systemctl stop walldns.service > /dev/null 2>&1 || :
77
-fi
78
-
79
-%postun
80
-/bin/systemctl daemon-reload > /dev/null 2>&1 || :
81
-if [ $1 -ge 1 ]; then
82
-    # Package upgrade, not uninstall
83
-    /bin/systemctl try-restart axfrdns.service > /dev/null 2>&1 || :
84
-    /bin/systemctl try-restart dnscache.service > /dev/null 2>&1 || :
85
-    /bin/systemctl try-restart rbldns.service > /dev/null 2>&1 || :
86
-    /bin/systemctl try-restart tinydns.service > /dev/null 2>&1 || :
87
-    /bin/systemctl try-restart walldns.service > /dev/null 2>&1 || :
88
-fi
89
-
90
-%endif
91
-
92
-%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
93
-
94
-%post
95
-%systemd_post axfrdns.service
96
-%systemd_post dnscache.service
97
-%systemd_post rbldns.service
98
-%systemd_post tinydns.service
99
-%systemd_post walldns.service
100
-
101
-%preun
102
-%systemd_preun axfrdns.service
103
-%systemd_preun dnscache.service
104
-%systemd_preun rbldns.service
105
-%systemd_preun tinydns.service
106
-%systemd_preun walldns.service
107
-
108
-%postun
109
-%systemd_postun_with_restart axfrdns.service
110
-%systemd_postun_with_restart dnscache.service
111
-%systemd_postun_with_restart rbldns.service
112
-%systemd_postun_with_restart tinydns.service
113
-%systemd_postun_with_restart walldns.service
114
-
115
-%endif
116
-
117
-%if 0%{?rhel} == 6 || 0%{?rhel} == 5
118
 
119
 %post
120
 /sbin/chkconfig --add axfrdns
121