uucp-vl.spec 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. %define _localstatedir /var
  2. %define _newconfigdir %{_sysconfdir}/uucp
  3. %define _oldconfigdir %{_sysconfdir}/uucp/oldconfig
  4. %define _varlogdir %{_localstatedir}/log/uucp
  5. %define _varlockdir %{_localstatedir}/lock
  6. %define _varspooldir %{_localstatedir}/spool
  7. Summary: The uucp utility for copying files between systems.
  8. Summary(ja): システム間でファイル転送を行う uucp ユーティリティ
  9. Name: uucp
  10. Version: 1.06.1
  11. Release: 33vl1
  12. Copyright: GPL
  13. Group: Applications/Communications
  14. Source0: ftp://prep.ai.mit.edu/pub/gnu/uucp-1.06.1.tar.gz
  15. Source1: uucp.log
  16. Patch0: uucp-1.06.1-misc.patch
  17. Patch1: uucp-1.06.1-uureroute.patch
  18. Patch2: uucp-perl.patch
  19. Patch3: uucp-1.06.1-sigfpe.patch
  20. Patch4: uucp-1.06.1-cfgmake.patch
  21. Patch5: uucp-1.06.1-lock.patch
  22. Patch6: uucp-1.06.1-baudboy.patch
  23. Patch7: uucp-1.06.1-vetargs2.patch
  24. Prereq: fileutils /sbin/install-info
  25. #BuildPrereq: lockdev-devel >= 1.0.0-14
  26. #Requires: lockdev >= 1.0.0-14
  27. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  28. %description
  29. The uucp command copies files between systems. Uucp is primarily used
  30. by remote machines downloading and uploading email and news files to
  31. local machines.
  32. %description -l ja
  33. uucp コマンドはシステム間でファイルをコピーします.
  34. uucp の主な使われ方としては,電子メールやニュースファイルの
  35. 遠隔マシンへのダウンロード/アップロード等があります.
  36. %prep
  37. %setup -q
  38. %patch -p1 -b .config
  39. %patch1 -p1 -b .perlpath
  40. %patch3 -p0
  41. %patch4 -p1 -b .cfgmake
  42. #%patch5 -p1 -b .lock
  43. #%patch6 -p1 -b .baudboy
  44. %patch7 -p1 -b .vetargs2
  45. find . -name "*.perlpath" -exec rm {} \;
  46. autoconf
  47. %build
  48. %configure
  49. make \
  50. owner=uucp group=uucp \
  51. newconfigdir=%{_newconfigdir} \
  52. oldconfigdir=%{_oldconfigdir} \
  53. man1dir=%{_mandir}/man1 \
  54. man8dir=%{_mandir}/man8 \
  55. all
  56. %install
  57. rm -rf ${RPM_BUILD_ROOT}
  58. mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
  59. mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1
  60. mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
  61. %makeinstall \
  62. owner=$(id -un) group=$(id -gn) \
  63. newconfigdir=${RPM_BUILD_ROOT}%{_newconfigdir} \
  64. oldconfigdir=${RPM_BUILD_ROOT}%{_oldconfigdir} \
  65. man1dir=${RPM_BUILD_ROOT}%{_mandir}/man1 \
  66. man8dir=${RPM_BUILD_ROOT}%{_mandir}/man8 \
  67. install-info
  68. gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/uucp*
  69. mkdir -p ${RPM_BUILD_ROOT}%{_varlogdir}
  70. mkdir -p ${RPM_BUILD_ROOT}%{_varlockdir}
  71. mkdir -p ${RPM_BUILD_ROOT}%{_varspooldir}/uucp
  72. mkdir -p ${RPM_BUILD_ROOT}%{_varspooldir}/uucppublic
  73. mkdir -p ${RPM_BUILD_ROOT}%{_oldconfigdir}
  74. strip ${RPM_BUILD_ROOT}%{_sbindir}/* || :
  75. strip ${RPM_BUILD_ROOT}%{_bindir}/* || :
  76. mkdir -p ${RPM_BUILD_ROOT}/usr/lib/uucp
  77. ln -sf ../../sbin/uucico ${RPM_BUILD_ROOT}/usr/lib/uucp/uucico
  78. mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
  79. install -m 644 $RPM_SOURCE_DIR/uucp.log ${RPM_BUILD_ROOT}/etc/logrotate.d/uucp
  80. # Create ghost files
  81. for n in Log Stats Debug; do
  82. touch ${RPM_BUILD_ROOT}%{_varlogdir}/$n
  83. done
  84. # the following is kind of gross, but it is effective
  85. for i in dial passwd port dialcode sys call ; do
  86. cat > ${RPM_BUILD_ROOT}%{_newconfigdir}/$i <<EOF
  87. # This is an example of a $i file. This file have the syntax compatible
  88. # with Taylor UUCP (not HDB, not anything else). Please check uucp
  89. # documentation if you are not sure how Taylor config files are supposed to
  90. # look like. Edit it as appropriate for your system.
  91. # Everything after a '#' character is a comment.
  92. EOF
  93. done
  94. # some more documentation
  95. texi2html -monolithic uucp.texi
  96. %clean
  97. rm -rf ${RPM_BUILD_ROOT}
  98. %post
  99. # Create initial log files so that logrotate doesn't complain
  100. for n in Log Stats Debug; do
  101. [ -f %{_varlogdir}/$n ] || touch %{_varlogdir}/$n
  102. chown uucp:uucp %{_varlogdir}/$n
  103. done
  104. chmod 644 %{_varlogdir}/Log %{_varlogdir}/Stats
  105. chmod 600 %{_varlogdir}/Debug
  106. /sbin/install-info %{_infodir}/uucp.info.gz %{_infodir}/dir
  107. %preun
  108. /sbin/install-info --del %{_infodir}/uucp.info.gz %{_infodir}/dir
  109. # 1.06.1-31vl0, 1.06.1-31vl1 owned /var/lock directory
  110. %triggerpostun -- uucp = 1.06.1-31vl1
  111. # owner/group/perms inconsistency with filesystem 775 root.uucp be fixed
  112. if [ -d /var/lock ];then
  113. chown root.uucp /var/lock >/dev/null 2>&1 || :
  114. chmod 775 /var/lock >/dev/null 2>&1 || :
  115. fi
  116. exit 0
  117. %triggerpostun -- uucp = 1.06.1-31vl0
  118. # owner/group/perms inconsistency with filesystem 775 root.uucp be fixed
  119. if [ -d /var/lock ];then
  120. chown root.uucp /var/lock >/dev/null 2>&1 || :
  121. chmod 775 /var/lock >/dev/null 2>&1 || :
  122. fi
  123. exit 0
  124. %files
  125. %defattr(-,root,root)
  126. %doc README COPYING ChangeLog MANIFEST NEWS
  127. %doc sample contrib uucp.html
  128. %attr(6555,uucp,uucp) %{_bindir}/cu
  129. %attr(4555,uucp,uucp) %{_bindir}/uucp
  130. %attr(0755,root,root) %{_bindir}/uulog
  131. %attr(6555,uucp,uucp) %{_bindir}/uuname
  132. %attr(0755,root,root) %{_bindir}/uupick
  133. %attr(4555,uucp,uucp) %{_bindir}/uustat
  134. %attr(0755,root,root) %{_bindir}/uuto
  135. %attr(4555,uucp,uucp) %{_bindir}/uux
  136. %attr(6555,uucp,uucp) %{_sbindir}/uucico
  137. %attr(6555,uucp,uucp) %{_sbindir}/uuxqt
  138. %attr(0755,uucp,uucp) %{_sbindir}/uuchk
  139. %attr(0755,uucp,uucp) %{_sbindir}/uuconv
  140. %attr(0755,root,root) %{_sbindir}/uusched
  141. %attr(755,uucp,uucp) %dir /usr/lib/uucp
  142. /usr/lib/uucp/uucico
  143. %{_mandir}/man[18]/*
  144. %{_infodir}/uucp.info*
  145. %attr(0755,uucp,uucp) %dir %{_varlogdir}
  146. %attr(0644,uucp,uucp) %ghost %{_varlogdir}/Log
  147. %attr(0644,uucp,uucp) %ghost %{_varlogdir}/Stats
  148. %attr(0600,uucp,uucp) %ghost %{_varlogdir}/Debug
  149. #XXX: we dont put this file at the momennt
  150. #%attr(755,uucp,uucp) %dir %{_varlockdir}
  151. %attr(755,uucp,uucp) %dir %{_varspooldir}/uucp
  152. %attr(755,uucp,uucp) %dir %{_varspooldir}/uucppublic
  153. %config(noreplace) /etc/logrotate.d/uucp
  154. %dir %{_newconfigdir}
  155. %dir %{_oldconfigdir}
  156. %attr(0640,root,uucp) %config(noreplace) %{_newconfigdir}/call
  157. %config(noreplace) %{_newconfigdir}/dial
  158. %config(noreplace) %{_newconfigdir}/dialcode
  159. %attr(0640,root,uucp) %config(noreplace) %{_newconfigdir}/passwd
  160. %config(noreplace) %{_newconfigdir}/port
  161. %config(noreplace) %{_newconfigdir}/sys
  162. %changelog
  163. * Sat Feb 09 2002 Toru Sagami <sagami@vinelinux.org> 1.06.1-33vl1
  164. - sync with 1.06.1-33.6.2 (filter all the long option aliases as well.)
  165. - don't own /var/lock and fix owner/permission in triggerpostun script
  166. * Wed Jan 23 2002 Toru Sagami <sagami@vinelinux.org> 1.06.1-31vl1
  167. - follow up with 1.06.1-31.6x (RHSA-2001:165-08)
  168. - fixed: man8 pages are installed into man1 dir
  169. * Mon Sep 03 2001 Toru Sagami <sagami@vinelinux.org>
  170. - 1.06.1-25vl2
  171. - define %%_localstatedir as /var (might implicitly want it done by rpmmacros)
  172. * Wed Jan 10 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  173. - 1.06.1-25vl1
  174. - based on 1.06.1-25 from Rawhide
  175. - added nochown patch for non-root rebuild (Patch10)
  176. - added Japanese summary and description
  177. * Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
  178. - automatic rebuild
  179. * Fri Jun 2 2000 Jeff Johnson <jbj@redhat.com>
  180. - FHS packaging.
  181. - map perms/owners into %%files to build as non-root.
  182. * Tue Mar 7 2000 Jeff Johnson <jbj@redhat.com>
  183. - rebuild for sparc baud rates > 38400.
  184. * Sun Feb 13 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  185. - change perms to be root:root for the config files and
  186. 0640,root:uucp for config files containing passwords
  187. - add patch from #6151 (division by zero, SIGFPE)
  188. - make %post work also for simple sh-versions
  189. * Mon Feb 7 2000 Jeff Johnson <jbj@redhat.com>
  190. - compress man pages.
  191. * Mon Aug 23 1999 Jeff Johnson <jbj@redhat.com>
  192. - add notifempty/missingok to logrotate config file (#4138).
  193. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  194. - auto rebuild in the new build environment (release 19)
  195. * Tue Dec 22 1998 Bill Nottingham <notting@redhat.com>
  196. - expunge /usr/local/bin/perl reference in docs
  197. * Thu Dec 17 1998 Cristian Gafton <gafton@redhat.com>
  198. - build for glibc 2.1
  199. * Tue May 05 1998 Prospector System <bugs@redhat.com>
  200. - translations modified for de, fr, tr
  201. * Sat Apr 11 1998 Cristian Gafton <gafton@redhat.com>
  202. - manhattan rebuild
  203. - added sample config files in /etc/uucp
  204. * Sun Oct 19 1997 Erik Troan <ewt@redhat.com>
  205. - spec file cleanups
  206. - added install-info support
  207. - uses a build root
  208. * Fri Oct 10 1997 Erik Troan <ewt@redhat.com>
  209. - patched uureroute to find perl in /usr/bin instead of /usr/local/bin
  210. - made log files ghosts
  211. * Mon Jul 21 1997 Erik Troan <ewt@redhat.com>
  212. - built against glibc
  213. * Tue Apr 22 1997 Erik Troan <ewt@redhat.com>
  214. - Brian Candler fixed /usr/lib/uucp/uucico symlink
  215. - Added "create" entries to log file rotation configuration
  216. - Touch log files on install if they don't already exist to allow proper
  217. rotation
  218. * Tue Mar 25 1997 Erik Troan <ewt@redhat.com>
  219. - symlinked /usr/sbin//uucico into /usr/lib/uucp
  220. - (all of these changes are from Brian Candler <B.Candler@pobox.com>)
  221. - sgid bit added on uucico so it can create lock files
  222. - log files moved to /var/log/uucp/ owned by uucp (so uucico can create them)
  223. - log rotation added
  224. - uses /etc/uucp/oldconfig instead of /usr/lib/uucp for old config files
  225. - package creates /etc/uucp and /etc/uucp/oldconfig directories
  226. - man pages reference the correct locations for spool and config files