cndrvcups-capt-vl.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. %define version 1.20
  2. %define release 3%{?_dist_release}
  3. %define rel 1
  4. Summary: Canon CAPT Printer Driver for Linux v%{version}
  5. Summary(ja): キヤノン CAPT プリンタドライバ v%{version}
  6. Name: cndrvcups-capt
  7. Version: %{version}
  8. Release: %{release}
  9. License: See the README files.
  10. # Copyright: Copyright CANON INC. 2004. All Rights Reserved.
  11. Vendor: CANON INC.
  12. Group: Applications/Publishing
  13. Source0: http://download.canon.jp/pub/driver/lasershot/linux/%{name}-%{version}-%{rel}.tar.gz
  14. Patch0: cndrvcups-capt-1.20-ppd.patch
  15. ExclusiveArch: %ix86 x86_64
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  17. Requires: cups gtk+ glib popt libxml2 zlib
  18. Requires: cndrvcups-common >= %{version}
  19. BuildRequires: cndrvcups-common >= 1.01
  20. BuildRequires: cups-devel gtk+-devel glib-devel
  21. BuildRequires: libxml2-devel zlib-devel
  22. BuildRequires: automake18
  23. %description
  24. Canon CAPT Printer Driver for Linux.
  25. This CAPT printer driver provides printing functions for Canon LBP printers
  26. operating under the CUPS (Common UNIX Printing System) environment.
  27. %description -l ja
  28. Linux用キヤノンCAPTプリンタドライバ。
  29. このCAPTプリンタドライバはCUPS (Common UNIX Printing System)環境で
  30. キヤノンLBPプリンタを扱うために必要な印刷機能を提供します。
  31. %prep
  32. %setup -q
  33. %patch -p1 -b .ppd
  34. %build
  35. pushd backend
  36. ./autogen.sh --prefix=%{_prefix}
  37. popd
  38. pushd pstocapt
  39. ./autogen.sh --prefix=%{_prefix}
  40. popd
  41. pushd ppd
  42. ./autogen.sh --prefix=%{_prefix}
  43. popd
  44. pushd statusui
  45. if [ -x /usr/bin/automake-1.8 ] ; then
  46. ./autogen.sh --prefix=%{_prefix}
  47. elif [ -x /usr/bin/automake-1.6] ; then
  48. ./autogen.sh --prefix=%{_prefix}
  49. else
  50. ./autogen-old.sh --prefix=%{_prefix}
  51. fi
  52. make
  53. %install
  54. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  55. mkdir -pv ${RPM_BUILD_ROOT}%{_bindir}
  56. mkdir -pv ${RPM_BUILD_ROOT}%{_sbindir}
  57. mkdir -pv ${RPM_BUILD_ROOT}%{_libdir}/cups/backend
  58. mkdir -pv ${RPM_BUILD_ROOT}%{_libdir}/cups/filter
  59. mkdir -pv ${RPM_BUILD_ROOT}%{_datadir}/locale/ja/LC_MESSAGES
  60. mkdir -pv ${RPM_BUILD_ROOT}%{_datadir}/ccpd
  61. mkdir -pv ${RPM_BUILD_ROOT}%{_datadir}/captmon
  62. mkdir -pv ${RPM_BUILD_ROOT}%{_datadir}/captmon2
  63. mkdir -pv ${RPM_BUILD_ROOT}%{_datadir}/cups/model/canon
  64. mkdir -pv ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/JP
  65. mkdir -pv ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/EN
  66. mkdir -pv ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d
  67. %makeinstall
  68. install -c -s -m 755 libs/captmon/captmon %{buildroot}%{_bindir}
  69. install -c -s -m 755 libs/captmon2/captmon2 %{buildroot}%{_bindir}
  70. install -c -s -m 755 libs/captfilter %{buildroot}%{_bindir}
  71. install -c -s -m 755 libs/ccpd %{buildroot}%{_sbindir}
  72. install -c -s -m 755 libs/ccpdadmin %{buildroot}%{_sbindir}
  73. #install -c -s -m 755 libs/ccpddata/CNAB1CL.BIN ${RPM_BUILD_ROOT}%{_datadir}/ccpd
  74. #install -c -s -m 755 libs/captmon/msgtable.xml ${RPM_BUILD_ROOT}%{_datadir}/captmon
  75. #install -c -s -m 755 libs/captmon2/msgtable2.xml ${RPM_BUILD_ROOT}%{_datadir}/captmon2
  76. #install -c -s -m 755 samples/ccpd.conf %{buildroot}%{_sysconfdir}
  77. #install -c -s -m 755 samples/ccpd %{buildroot}%{_sysconfdir}/init.d
  78. install -c -m 755 libs/ccpddata/CNAB1CL.BIN ${RPM_BUILD_ROOT}%{_datadir}/ccpd
  79. install -c -m 755 libs/captmon/msgtable.xml ${RPM_BUILD_ROOT}%{_datadir}/captmon
  80. install -c -m 755 libs/captmon2/msgtable2.xml ${RPM_BUILD_ROOT}%{_datadir}/captmon2
  81. install -c -m 755 samples/ccpd.conf %{buildroot}%{_sysconfdir}
  82. install -c -m 755 samples/ccpd %{buildroot}%{_sysconfdir}/init.d
  83. %clean
  84. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  85. %post
  86. if [ ! -d /var/ccpd ] ; then
  87. mkdir /var/ccpd
  88. mkfifo -m 600 /var/ccpd/fifo0
  89. mkfifo -m 600 /var/ccpd/fifo1
  90. mkfifo -m 600 /var/ccpd/fifo2
  91. mkfifo -m 600 /var/ccpd/fifo3
  92. mkfifo -m 600 /var/ccpd/fifo4
  93. mkfifo -m 600 /var/ccpd/fifo5
  94. mkfifo -m 600 /var/ccpd/fifo6
  95. mkfifo -m 600 /var/ccpd/fifo7
  96. chown lp.lp /var/ccpd/*
  97. fi
  98. # /sbin/chkconfig --add ccpd
  99. %preun
  100. # if [ "$1" = 0 ] ; then
  101. # /sbin/service ccpd stop > /dev/null 2>&1
  102. # /sbin/chkconfig --del ccpd
  103. # fi
  104. # exit 0
  105. %postun
  106. if [ "$1" = 0 ] ; then
  107. rm -Rf /var/ccpd
  108. # else
  109. # /sbin/service ccpd restart > /dev/null 2>&1
  110. fi
  111. %files
  112. %defattr(-,root,root)
  113. %doc README-capt-*.txt
  114. %doc LICENSE-capt-*.txt
  115. %{_libdir}/cups/backend/ccp
  116. %{_libdir}/cups/filter/pstocapt
  117. %{_bindir}/captstatusui
  118. %{_datadir}/locale/ja/LC_MESSAGES/captstatusui.mo
  119. %{_datadir}/cups/model/canon/CNCUPS*CAPT*.PPD
  120. %{_datadir}/ccpd/CNAB1CL.BIN
  121. %{_datadir}/captmon/msgtable.xml
  122. %{_datadir}/captmon2/msgtable2.xml
  123. %{_bindir}/captmon
  124. %{_bindir}/captmon2
  125. %{_bindir}/captfilter
  126. %{_sbindir}/ccpd
  127. %{_sbindir}/ccpdadmin
  128. %config(noreplace) %{_sysconfdir}/ccpd.conf
  129. %config %{_sysconfdir}/init.d/ccpd
  130. %changelog
  131. * Tue Oct 21 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.20-3
  132. - spec really in utf-8 :)
  133. - add ExclusiveArch, because this package contains prebuilt binaries
  134. for ix86 archtecture (captmon etc.)
  135. * Mon Oct 20 2008 Shu KONNO <owa@bg.wakwak.com> 1.20-2vl5
  136. - applied new versioning policy, spec in utf-8
  137. - without strip-option to install some files
  138. * Tue Sep 6 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.20-1vl1
  139. - new upstream release
  140. * Tue Oct 26 2004 Satoshi MACHINO <machino@vinelinux.org> 1.02-1vl1
  141. - intial release
  142. -- added cndrvcups-capt-1.02-ppd.patch