source: projects/specs/branches/6/p/portreserve/portreserve-vl.spec @ 3075

Revision 3075, 4.1 KB checked in by daisuke, 13 years ago (diff)

portreserve: new package

Line 
1Summary: TCP port reservation utility
2Summary(ja): TCP ポート予約ユーティリティ
3Name: portreserve
4Version: 0.0.4
5Release: 1%{?_dist_release}
6License: GPLv2+
7Group: System Environment/Daemons
8URL: http://cyberelk.net/tim/portreserve/
9Source0: http://cyberelk.net/tim/data/portreserve/stable/%{name}-%{version}.tar.bz2
10Patch1: portreserve-infinite-loop.patch
11Patch2: portreserve-initscript.patch
12BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
13
14BuildRequires: xmlto
15
16%description
17The portreserve program aims to help services with well-known ports that
18lie in the portmap range.  It prevents portmap from a real service's port
19by occupying it itself, until the real service tells it to release the
20port (generally in the init script).
21
22%prep
23%setup -q
24# Prevent infinite loop.
25%patch1 -p1 -b .infinite-loop
26# Fixed initscript exit code for "status" action (bug #619089).
27%patch2 -p1 -b .initscript
28
29%build
30%configure --sbindir=/sbin
31make
32
33%install
34rm -rf %{buildroot}
35make DESTDIR=%{buildroot} install
36mkdir -p %{buildroot}%{_localstatedir}/run/portreserve
37mkdir -p %{buildroot}%{_initrddir}
38install -m755 portreserve.init %{buildroot}%{_initrddir}/portreserve
39mkdir -p %{buildroot}%{_sysconfdir}/portreserve
40mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
41cat <<EOF > %{buildroot}%{_sysconfdir}/tmpfiles.d/portreserve.conf
42d %{_localstatedir}/run/portreserve 0755 root root 10d
43EOF
44
45%clean
46rm -rf %{buildroot}
47
48%post
49# Do this unconditionally to fix up the initscript's start priority.
50# Earlier versions had an incorrect dependency (bug #487250).
51/sbin/chkconfig --add portreserve
52
53%preun
54if [ "$1" = 0 ]; then
55  /sbin/service portreserve stop >/dev/null 2>&1
56  /sbin/chkconfig --del portreserve
57fi
58
59%postun
60if [ "$1" -ge "1" ]; then
61  /sbin/service portreserve condrestart >/dev/null 2>&1
62fi
63
64%files
65%defattr(-,root,root)
66%doc ChangeLog README COPYING NEWS
67%ghost %dir %{_localstatedir}/run/portreserve
68%dir %{_sysconfdir}/portreserve
69%config %{_sysconfdir}/tmpfiles.d/portreserve.conf
70%attr(755,root,root) %{_initrddir}/portreserve
71/sbin/*
72%{_mandir}/*/*
73
74%changelog
75* Wed Mar 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.0.4-1
76- initial build for Vine Linux
77
78* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-8
79- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
80
81* Thu Dec  2 2010 Tim Waugh <twaugh@redhat.com> 0.0.4-7
82- /var/run changes for systemd (bug #656670).
83
84* Thu Nov 18 2010 Tim Waugh <twaugh@redhat.com> 0.0.4-6
85- Fixed initscript exit code for "status" action (bug #619089).
86
87* Thu Mar  4 2010 Tim Waugh <twaugh@redhat.com> 0.0.4-5
88- Added comments to all patches.
89
90* Fri Jan 22 2010 Tim Waugh <twaugh@redhat.com> 0.0.4-4
91- Walk the list of newmaps correctly (bug #557781).
92
93* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.4-2
94- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
95
96* Fri Feb 27 2009 Tim Waugh <twaugh@redhat.com> 0.0.4-1
97- 0.0.4:
98  - Fixed initscript so that it will not be reordered to start after
99    rpcbind (bug #487250).
100
101* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.3-4
102- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
103
104* Wed Feb  4 2009 Tim Waugh <twaugh@redhat.com> 0.0.3-3
105- No longer need SELinux policy as it is now part of the
106  selinux-policy package.
107
108* Wed Oct 15 2008 Tim Waugh <twaugh@redhat.com> 0.0.3-2
109- New selinux sub-package for SELinux policy.  Policy contributed by
110  Miroslav Grepl (thanks!).
111
112* Tue Jul  1 2008 Tim Waugh <twaugh@redhat.com> 0.0.3-1
113- 0.0.3:
114  - Allow multiple services to be defined in a single configuration
115    file.
116  - Allow protocol specifications, e.g. ipp/udp.
117
118* Mon Jun 30 2008 Tim Waugh <twaugh@redhat.com> 0.0.2-1
119- 0.0.2.
120
121* Fri May  9 2008 Tim Waugh <twaugh@redhat.com> 0.0.1-2
122- More consistent use of macros.
123- Build requires xmlto.
124- Don't use %%makeinstall.
125- No need to run make check.
126
127* Thu May  8 2008 Tim Waugh <twaugh@redhat.com> 0.0.1-1
128- Default permissions for directories.
129- Initscript should not be marked config.
130- Fixed license tag.
131- Better buildroot tag.
132
133* Wed Sep  3 2003 Tim Waugh <twaugh@redhat.com>
134- Initial spec file.
Note: See TracBrowser for help on using the repository browser.