kernel-pcmcia-cs-vl.spec 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. %define pcmciaver 3.2.7
  2. Name: kernel-pcmcia-cs
  3. Version: %{pcmciaver}
  4. Release: 0vl3
  5. Summary: The daemon, scripts and config files for using PCMCIA adapters.
  6. Summary(ja): PCMCIA アダプタ用のデーモン/スクリプト/設定ファイル
  7. Group: System Environment/Kernel
  8. Copyright: GPL
  9. ExclusiveArch: i386 ppc
  10. Epoch: 1
  11. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  12. BuildRequires: kernel-source, byacc
  13. Vendor: Project Vine
  14. Distribution: Vine Linux
  15. Source0: ftp://projects.sourceforge.net/pub/pcmcia-cs/pcmcia-cs-%{pcmciaver}.tar.gz
  16. Source1: pcmcia-cs-2.8.8-network.script
  17. Source2: pcmcia-cs-3.1.24-isdn.script
  18. Source3: pcmcia-vine-config
  19. URL: http://pcmcia-cs.sourceforge.net/
  20. # pcmcia configs
  21. Source100: http://www.st.rim.or.jp/~adats/WL/add.conf
  22. Source110: vine.conf
  23. %{?nosrc:NoSource: 0}
  24. Patch0: pcmcia-cs-3.1.18-script.patch
  25. Patch1: pcmcia-cs-3.1.18-config.patch
  26. Patch3: pcmcia-cs-3.2.1-rctrans.patch
  27. Patch4: pcmcia-cs-3.1.30-yenta.patch
  28. Patch5: pcmcia-cs-3.1.23-updfstab.patch
  29. Patch6: pcmcia-cs-3.1.24-portrange.patch
  30. Patch7: pcmcia-cs-3.1.24-wireless.patch
  31. Patch8: pcmcia-cs-3.1.29-build.patch.bz2
  32. Patch9: pcmcia-cs-3.2.4-pmac.patch
  33. Patch10: pcmcia-cs-3.2.1-installman.patch
  34. Patch11: pcmcia-cs-3.1.31-configure.patch
  35. Patch12: pcmcia-cs-3.1.31-fixbuild.patch.bz2
  36. Patch13: pcmcia-cs-3.1.31-umask.patch.bz2
  37. Patch14: pcmcia-cs-3.2.0-no-function-binding.patch.bz2
  38. Patch15: pcmcia-cs-3.2.3-no-forms.patch.bz2
  39. Requires: kernel >= 2.4.3, chkconfig, kudzu >= 0.95, murasaki
  40. Obsoletes: kernel24-pcmcia-cs, pcmcia-cs
  41. %description
  42. Many laptop machines (and some non-laptops) support PCMCIA cards for
  43. expansion. Also known as "credit card adapters," PCMCIA cards are
  44. small cards for everything from SCSI support to modems. PCMCIA cards
  45. are hot swappable (i.e., they can be exchanged without rebooting the
  46. system) and quite convenient to use. The kernel-pcmcia-cs package
  47. contains a card manager daemon that can respond to card insertion and
  48. removal events by loading and unloading drivers on demand. The daemon
  49. also supports hot swapping, so that the cards can be safely inserted
  50. and ejected at any time.
  51. %description -l ja
  52. 多くのラップトップ機 (および一部のデスクトップ機) は PCMCIA カードを
  53. サポートしています.「クレジットカードアタプタ」という別名の通り,
  54. PCMCIA カードは SCSI サポートからモデムまで様々な機能を提供する
  55. カードです.PCMCIA カードはホットスワップ可能 (詰まりシステムを
  56. 再起動することなく差し替え可能) で,非常に便利に使うことができます.
  57. kernel-pcmcia-cs パッケージにはそしてカードを挿したり抜いたりする
  58. のにあわせてドライバを動的に読み込み/切り離しするカードマネージャ
  59. デーモン等が収められています.このデーモンはホットスワップに対応
  60. しており, PCMCIA カードをいつでも好きなときに抜き差しすることを
  61. 可能にしています.
  62. %prep
  63. %setup -n pcmcia-cs-%{version} -q
  64. %patch0 -p1 -b .script
  65. %patch1 -p2 -b .config
  66. %patch3 -p1 -b .rctrans
  67. #%patch4 -p1 -b .yenta
  68. %patch5 -p1 -b .fstab
  69. %patch6 -p1 -b .portrange
  70. %patch7 -p1 -b .wireless
  71. %patch8 -p1 -b .build
  72. %patch9 -p1 -b .ppc
  73. %patch10 -p1 -b .installman
  74. %patch11 -p0 -b .configure
  75. %patch12 -p1 -b .fixbuild
  76. %patch13 -p1 -b .umask
  77. %patch14 -p1 -b .no-function
  78. %patch15 -p1 -b .no-forms
  79. # replace pcmcia-cs *_cb driver with kernel-2.4 driver
  80. perl -pi -e 's/_cb//g' etc/config etc/memory
  81. %build
  82. ./Configure -n --kernel=/usr/src/linux \
  83. --target=$RPM_BUILD_ROOT --trust --cardbus --srctree \
  84. --sysv --rcdir=/etc/rc.d
  85. perl -pi -e 's/\/usr\/man/'`echo %{_mandir} | sed 's_/_\\\\/_g'`/ man/Makefile
  86. make all
  87. make debug-tools/lspnp
  88. %install
  89. rm -rf $RPM_BUILD_ROOT
  90. mkdir -p $RPM_BUILD_ROOT%{_mandir}
  91. mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
  92. make MANDIR=$RPM_BUILD_ROOT%{_mandir} PREFIX=$RPM_BUILD_ROOT install
  93. # before we(who?) get into RedHat style, leave pcmcia-cs guy
  94. mv $RPM_BUILD_ROOT/etc/pcmcia/network \
  95. $RPM_BUILD_ROOT/etc/pcmcia/network.pcmcia-cs
  96. mv $RPM_BUILD_ROOT/etc/pcmcia/network.opts \
  97. $RPM_BUILD_ROOT/etc/pcmcia/network.pcmcia-cs.opts
  98. # Install our own network up/down script
  99. install -m755 %{SOURCE1} $RPM_BUILD_ROOT/etc/pcmcia/network
  100. install -m755 %{SOURCE2} $RPM_BUILD_ROOT/etc/pcmcia/isdn
  101. install -m755 %{SOURCE3} $RPM_BUILD_ROOT/etc/pcmcia/config
  102. # Install configs for Vine Linux
  103. install -m644 %{SOURCE100} $RPM_BUILD_ROOT/etc/pcmcia/
  104. install -m644 %{SOURCE110} $RPM_BUILD_ROOT/etc/pcmcia/
  105. # We need our own default /etc/sysconfig/pcmcia
  106. cat > $RPM_BUILD_ROOT/etc/sysconfig/pcmcia <<EOF
  107. PCMCIA=yes
  108. PCIC=yenta_socket
  109. #PCIC_OPTS=do_scan=0
  110. PCIC_OPTS=
  111. CORE_OPTS="unreset_delay=400"
  112. CARDMGR_OPTS=-f
  113. EOF
  114. install -m755 debug-tools/lspnp $RPM_BUILD_ROOT/sbin/lspnp
  115. %clean
  116. rm -rf $RPM_BUILD_ROOT
  117. %post
  118. /sbin/chkconfig --add pcmcia
  119. %preun
  120. if [ $1 = 0 ]; then
  121. /sbin/chkconfig --del pcmcia
  122. fi
  123. exit 0
  124. %triggerpostun -- kernel-pcmcia-cs < 2.2.5
  125. if [ -f /etc/rc.d/init.d/pcmcia ] ; then
  126. /sbin/chkconfig --add pcmcia
  127. fi
  128. %triggerpostun -- kernel24-pcmcia-cs
  129. if [ -f /etc/rc.d/init.d/pcmcia ] ; then
  130. /sbin/chkconfig --add pcmcia
  131. fi
  132. %files
  133. %defattr(-,root,root)
  134. %doc doc/PCMCIA-HOWTO
  135. %doc doc/PCMCIA-PROG
  136. %doc SUPPORTED.CARDS
  137. %doc CHANGES
  138. %doc COPYING*
  139. %doc README*
  140. %ifnarch ppc
  141. /sbin/pcic_probe
  142. %endif
  143. /sbin/lspnp
  144. %attr(4755,root,root) /sbin/cardctl
  145. /sbin/cardmgr
  146. /sbin/dump_cis
  147. /sbin/ftl_check
  148. /sbin/ftl_format
  149. /sbin/ifport
  150. /sbin/ifuser
  151. /sbin/pack_cis
  152. /sbin/scsi_info
  153. /sbin/ide_info
  154. /sbin/pcinitrd
  155. %{_mandir}/man[45]/*
  156. %{_mandir}/man8/*
  157. /etc/pcmcia/cis
  158. %dir /etc/pcmcia
  159. %config /etc/pcmcia/config
  160. %config(noreplace) /etc/pcmcia/config.opts
  161. /etc/pcmcia/ftl
  162. %config(noreplace) /etc/pcmcia/ftl.opts
  163. /etc/pcmcia/ide
  164. %config(noreplace) /etc/pcmcia/ide.opts
  165. /etc/pcmcia/memory
  166. %config(noreplace) /etc/pcmcia/memory.opts
  167. /etc/pcmcia/network
  168. /etc/pcmcia/isdn
  169. /etc/pcmcia/parport
  170. %config(noreplace) /etc/pcmcia/parport.opts
  171. /etc/pcmcia/scsi
  172. %config(noreplace) /etc/pcmcia/scsi.opts
  173. /etc/pcmcia/serial
  174. %config(noreplace) /etc/pcmcia/serial.opts
  175. /etc/pcmcia/wireless
  176. %config(noreplace) /etc/pcmcia/wireless.opts
  177. /etc/pcmcia/shared
  178. /etc/pcmcia/vine.conf
  179. /etc/pcmcia/add.conf
  180. /etc/pcmcia/ieee1394
  181. %config(noreplace) /etc/pcmcia/ieee1394.opts
  182. %attr(755,root,root) /etc/pcmcia/usb_ohci
  183. %config(noreplace) /etc/pcmcia/usb_ohci.opts
  184. %attr(644,root,root) /etc/pcmcia/network.pcmcia-cs
  185. %attr(644,root,root) /etc/pcmcia/network.pcmcia-cs.opts
  186. #/etc/rc.d/init.d/pcmcia
  187. %attr(755,root,root) %config /etc/rc.d/init.d/pcmcia
  188. %dir /var/lib/pcmcia
  189. %config(noreplace) /etc/sysconfig/pcmcia
  190. %changelog
  191. * Fri Jul 30 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.7-0vl3
  192. - fixed typo in vine.conf
  193. * Wed Jul 28 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.7-0vl2
  194. - update vine.conf to support BUFFALO LPC4-CLX
  195. (thanks to Mikawaya Cima-nosuke)
  196. * Sat Jun 19 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.2.7-0vl1
  197. - source update
  198. * Sun Oct 12 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.5-0vl2
  199. - update vine.conf
  200. - add BUFFALO LPC-CF-CLT R01 (thanks to NAKAJIMA Mikio)
  201. * Sun Oct 05 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.5-0vl1
  202. - new upstream release
  203. - modify /etc/pcmcia/config to use kernel-2.4 driver
  204. * Sun Jun 02 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.2.4-0vl5
  205. - fixed Patch9
  206. * Sun Apr 27 2003 Satoshi MACHINO <machino@vinelinux.org> 3.2.4-0vl4
  207. - updated vine.conf
  208. -- added PLANEX GW-NS11H
  209. * Fri Apr 19 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.2.4-0vl3
  210. - removed Pathc4(yenta)
  211. - changed default /etc/sysconfig/pcmcia
  212. PCMCIA=yes
  213. PCIC=yenta_socket
  214. PCIC_OPTS=do_scan=0
  215. CORE_OPTS="unreset_delay=400"
  216. CARDMGR_OPTS=-f
  217. * Wed Mar 26 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.2.4-0vl1
  218. - source update
  219. - added again (noreplace) tag at config.opts
  220. - changed default /etc/sysconfig/pcmcia
  221. PCMCIA=yes
  222. PCIC=
  223. PCIC_OPTS=do_scan=0
  224. CORE_OPTS="unreset_delay=400"
  225. CARDMGR_OPTS=-f
  226. * Sat Sep 14 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.2.1-0vl3
  227. - fixed again config
  228. - removed (noreplace) tag at config.opts
  229. * Fri Sep 13 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.2.1-0vl2
  230. - fixed config, add.conf, vine.conf and config.opts.ppc
  231. * Fri Sep 13 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.2.1-0vl1
  232. - source update
  233. * Sun Mar 31 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.1.31-0vl7
  234. - modified Patch4 again
  235. * Sat Mar 30 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.31-0vl6
  236. - changed patch4, we are use kernel-2.4 for default.
  237. replace yenta and i82365 for PCIC environment.
  238. * Thu Mar 14 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.31-0vl5
  239. - update add.conf/vine.conf/config to use orinoco_cs
  240. - update add.conf
  241. * Sat Mar 09 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.1.31-0vl4
  242. - added %%triggerpostun -- kernel24-pcmcia-cs
  243. * Mon Mar 04 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 3.1.31-0vl3
  244. - Obsoletes kernel24-pcmcia-cs
  245. - modified summary and description (this package doesn't contain any drivers)
  246. * Sun Mar 03 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.1.31-0vl2
  247. - rename from kernel24 to kernel
  248. - Configure checks $LINUX/configs/kernel-{ver}-{arch}.config
  249. * Sun Feb 24 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.1.31-0vl2
  250. - remove lspnp for all arch.
  251. * Thu Feb 21 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.1.31-0vl1
  252. - source update
  253. * Sun Jan 27 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.1.30-0vl5
  254. - in rc.pcmcia, changed kudzu -> /usr/sbin/kudzu
  255. - [VineSeed:05523] by MATSUBAYASHI 'Shaolin' Kohji
  256. * Sun Jan 13 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.1.30-0vl4
  257. - set cardctl setuid root
  258. - fixed add.conf and vine.conf
  259. * Sat Jan 12 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.1.30-0vl3
  260. - reverted to using Configure script
  261. * Thu Jan 10 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.1.30-0vl2
  262. - added Requires: murasaki
  263. * Wed Jan 09 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 3.1.30-0vl1
  264. - based on kernel-pcmcia-cs-3.1.27-11