]> git.pld-linux.org Git - SPECS.git/blob - mydns.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / mydns.spec
1 # TODO:
2 # - fix configure patch to change source file instead of generated configure
3 #
4 # Conditional build:
5 %bcond_with     mysql           # enable MySQL support
6 %bcond_with     pgsql           # enable PostgreSQL support
7 %bcond_with     ssl             # enable TLS/SSL support
8 #
9 Summary:        MyDNS - a free Database Driven Nameserver
10 Summary(pl.UTF-8):      MyDNS - darmowy serwer nazw wykorzystujący relacyjne bazy danych
11 Name:           mydns
12 Version:        1.1.0
13 Release:        1
14 License:        GPL v2
15 Group:          Networking/Daemons
16 Source0:        http://mydns.bboy.net/download/%{name}-%{version}.tar.gz
17 Source1:        %{name}.conf
18 Source2:        %{name}.init
19 Source3:        %{name}.sysconfig
20 Patch0:         %{name}-configure.patch
21 URL:            http://mydns.bboy.net/
22 BuildRequires:  autoconf >= 2.59
23 BuildRequires:  automake >= 1:1.9.6
24 %{?with_mysql:BuildRequires:    mysql-devel}
25 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7i}
26 %{?with_pgsql:BuildRequires:    postgresql-devel}
27 BuildRequires:  rpmbuild(macros) >= 1.310
28 BuildRequires:  texinfo
29 BuildRequires:  zlib-devel
30 Requires(post,preun):   /sbin/chkconfig
31 Requires:       rc-scripts
32 Provides:       nameserver
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 MyDNS is a free DNS server implemented from scratch and is designed to
37 serve records directly from an SQL database, either MySQL or
38 PostgreSQL.
39
40 %description -l pl.UTF-8
41 MyDNS to darmowy serwer nazw zaimplementowany od podstaw i
42 zaprojektowany aby udostępniać rekordy bezpośrednio z bazy SQL -
43 obecnie MySQL lub PostgreSQL.
44
45 %prep
46 %setup -q
47 %patch0 -p1
48
49 %build
50 %configure \
51         --disable-nls \
52         --with-confdir=%{_sysconfdir}/%{name} \
53         --with%{?with_mysql:out}-pgsql \
54         --with%{?with_pgsql:out}-mysql \
55         --with%{!?with_ssl:out}-openssl
56
57 %{__make}
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{name},/etc/sysconfig}
62
63 %{__make} install \
64         DESTDIR=$RPM_BUILD_ROOT
65
66 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
67 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
68 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mydns
69
70 rm -f $RPM_BUILD_ROOT%{_infodir}/dir*
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %post
76 /sbin/chkconfig --add %{name}
77 %service %{name} restart
78 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
79
80 %preun
81 if [ "$1" = "0" ]; then
82         %service -q %{name} stop
83         /sbin/chkconfig --del %{name}
84 fi
85
86 %postun -p      /sbin/postshell
87 -/usr/sbin/fix-info-dir -c %{_infodir}
88
89 %files
90 %defattr(644,root,root,755)
91 %doc ChangeLog AUTHORS BUGS README README.mysql INSTALL NEWS TODO QUICKSTART.*
92 %attr(754,root,root) /etc/rc.d/init.d/%{name}
93 %dir %{_sysconfdir}/%{name}
94 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
95 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mydns
96 %attr(755,root,root) %{_sbindir}/*
97 %attr(755,root,root) %{_bindir}/*
98 %{_infodir}/*.info*
99 %{_mandir}/man*/*
This page took 0.95868 seconds and 3 git commands to generate.