~ubuntu-branches/ubuntu/karmic/pdnsd/karmic

« back to all changes in this revision

Viewing changes to pdnsd.spec.in

  • Committer: Bazaar Package Importer
  • Author(s): Takuo KITAME
  • Date: 2002-04-07 02:30:11 UTC
  • Revision ID: james.westby@ubuntu.com-20020407023011-6zzd1y8a8tk5fz97
Tags: upstream-1.1.7
ImportĀ upstreamĀ versionĀ 1.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: pdnsd.spec.in,v 1.9 2001/05/17 14:14:27 tmm Exp $
 
2
%define name  @PACKAGE@
 
3
%define ver      @VERSION@
 
4
%define rel 1
 
5
%define prefix  /usr
 
6
%define confdir /etc
 
7
%define distro @distribution@
 
8
 
 
9
Summary: A caching dns proxy for small networks or dialin accounts
 
10
Name: %{name}
 
11
Version: %ver
 
12
Release: %rel
 
13
Copyright: GPL
 
14
Group:  Daemons
 
15
Source: %{name}-%{ver}.tar.gz
 
16
URL: http://home.t-online.de/home/Moestl/
 
17
Vendor: Thomas Moestl
 
18
Distribution: %{distro}
 
19
Prefix: %{prefix} 
 
20
BuildRoot: /var/tmp/%{name}-%{ver}-%{rel}-rpm-buildroot
 
21
 
 
22
%description
 
23
pdnsd is a proxy DNS daemon with permanent (disk-)cache and the ability
 
24
to serve local records. It is designed to detect network outages or hangups
 
25
and to prevent DNS-dependent applications like Netscape Navigator from hanging.
 
26
 
 
27
%prep
 
28
%setup
 
29
 
 
30
%build
 
31
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --sysconfdir=%{confdir} --with-distribution=%{distro} --mandir=%{_mandir} --enable-specbuild=yes
 
32
%__make
 
33
 
 
34
%install
 
35
%__make DESTDIR=${RPM_BUILD_ROOT} install; \
 
36
cp -f file-list.base file-list ; \
 
37
CURDIR=`pwd`; cd ${RPM_BUILD_ROOT} ; \
 
38
FILES=$(find . | sed 's/^\.//' \
 
39
  | grep -v pdnsd.conf \
 
40
  | grep -v '/usr/doc' \
 
41
  | grep -v '/usr/share/doc' \
 
42
  | grep -v '/var') ;
 
43
for FILE in $FILES; do \
 
44
  if [ ! -d "$FILE" ] ; then \
 
45
    if echo $FILE | grep -v '\.gz$' | grep -q man ; then \
 
46
      FILE="$FILE.gz" ; \
 
47
    fi ; \
 
48
    echo $FILE >> $CURDIR/file-list ; \
 
49
  fi ; \
 
50
done
 
51
 
 
52
%clean
 
53
if [ -O "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" -a "$RPM_BUILD_ROOT" != "$HOME" ]; then
 
54
  echo "Deleting build root $RPM_BUILD_ROOT"
 
55
  rm -rf "$RPM_BUILD_ROOT"
 
56
fi
 
57
rm -rf ${RPM_BUILD_DIR}/%{name}-%{ver}
 
58
 
 
59
%files -f file-list
 
60
 
 
61
%post
 
62
if [ "%{distro}" = "SuSE" -a -w /etc/rc.config ]; then 
 
63
  grep "START_PDNSD" /etc/rc.config > /dev/null
 
64
  if [ $? -ne 0 ] ; then
 
65
    echo -e \
 
66
"\n\n#\n# Set to yes to start pdnsd at boot time\n#\nSTART_PDNSD=yes" \
 
67
>> /etc/rc.config
 
68
  fi
 
69
elif [ "%{distro}" = "RedHat" ]; then
 
70
  if [ $1 = 1 ]; then
 
71
    /sbin/chkconfig --add pdnsd
 
72
  fi
 
73
fi
 
74
 
 
75
%preun
 
76
if [ "%{distro}" = "RedHat" ]; then
 
77
  if [ $1 = 0 ]; then
 
78
    /sbin/chkconfig --del pdnsd
 
79
  fi
 
80
fi
 
81
 
 
82
%postun
 
83
if [ "%{distro}" = "RedHat" ]; then
 
84
  if [ $1 -ge 1 ]; then
 
85
    /sbin/service pdnsd condrestart >/dev/null 2>&1
 
86
  fi
 
87
fi
 
88
 
 
89
%changelog
 
90
* Sun May 16 2001 Thomas Moestl <tmoestl@gmx.net>
 
91
- Make use of chkconfig for Red Hat (patch by Christian Engstler)
 
92
* Sun Mar 25 2001 Thomas Moestl <tmoestl@gmx.net>
 
93
- Merged SuSE fixes by Christian Engstler
 
94
* Fri Feb 09 2001 Thomas Moestl <tmoestl@gmx.net>
 
95
- Merged in a spec fix for mapage inclusion contributed by Sourav K.
 
96
  Mandal
 
97
* Sun Nov 26 2000 Thomas Moestl <tmoestl@gmx.net>
 
98
- Added some patches contributed by Bernd Leibing
 
99
* Tue Aug 15 2000 Thomas Moestl <tmoestl@gmx.net>
 
100
- Added the distro for configure
 
101
* Tue Jul 11 2000 Sourav K. Mandal <smandal@mit.edu>
 
102
- autoconf/automake modifications