ndiswrapper-vl.spec 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. %define build_kmod 0
  2. %define kversion %(uname -r)
  3. %define kver %(uname -r | sed -e 's/-/_/g')
  4. %define kflavor %(uname -r | sed -e 's/.*vl.//')
  5. %if "%kflavor" == ""
  6. %undefine kflavor
  7. %endif
  8. %define kmod kernel-module%{?kflavor:-%{kflavor}}
  9. %define name ndiswrapper
  10. %define ver 1.55
  11. %define rel 1%{?_dist_release}
  12. Summary: Utilities to load and run Windows XP WLAN drivers
  13. Summary(ja): Windows XP 用無線 LAN ドライバを利用する為の補助ツール群
  14. Name: %{name}
  15. Version: %{ver}
  16. Release: %{rel}
  17. Source0: %{name}-%{version}.tar.gz
  18. Source10: %{name}-kmp.spec
  19. Patch0: %{name}-1.19-gcc33.patch
  20. Patch1: %{name}-1.54-module-init-tools.patch
  21. Patch2: %{name}-1.55-2.6.31.patch
  22. License: GPL
  23. Group: System Environment/Base
  24. URL: http://ndiswrapper.sourceforge.net/
  25. BuildRequires: kernel-devel
  26. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  27. %description
  28. Some wireless LAN vendors refuse to release hardware specifications or
  29. drivers for their products for operating systems other than Microsoft
  30. Windows. This package includes user space tool to load and run Windows
  31. XP drivers for wireless cards.
  32. %description -l ja
  33. いくつかの無線 LAN カードのベンダーは、製品の仕様を公開しておらず、
  34. Microsoft Windows 以外の OS 用のドライバを提供していません。
  35. このパッケージは Windows XP 用のドライバを Linux で利用する為の、
  36. ツールを含んでいます。
  37. %package -n dkms-%{name}
  38. Summary: Linux kernel module to load and run Windows XP WLAN drivers
  39. Summary(ja): Windows XP 用無線 LAN ドライバを利用する為の Linux カーネルモジュール
  40. License: GPL
  41. Group: System Environment/Kernel
  42. Requires(pre): kernel, kernel-devel
  43. Requires(post): dkms
  44. Requires(preun): dkms
  45. Requires: %{name} = %{version}-%{release}
  46. Obsoletes: kernel-module-ndiswrapper
  47. %description -n dkms-%{name}
  48. Some wireless LAN vendors refuse to release hardware specifications or
  49. drivers for their products for operating systems other than Microsoft
  50. Windows. This package includes Linux kernel module to load and run
  51. Windows XP drivers for wireless cards.
  52. %description -l ja -n dkms-%{name}
  53. いくつかの無線 LAN カードのベンダーは、製品の仕様を公開しておらず、
  54. Microsoft Windows 以外の OS 用のドライバを提供していません。
  55. このパッケージは Windows XP 用のドライバを Linux で利用する為の、
  56. カーネルモジュールを含んでいます。
  57. %prep
  58. %setup -q
  59. %patch0 -p1
  60. %patch1 -p1
  61. %patch2 -p1
  62. %build
  63. %__make -C utils
  64. %install
  65. %__rm -rf %{buildroot}
  66. %__make -C utils install DESTDIR=%{buildroot}
  67. mkdir -p -m 0755 %{buildroot}%{_mandir}/man8
  68. install -m 644 ndiswrapper.8 %{buildroot}%{_mandir}/man8/
  69. install -m 644 loadndisdriver.8 %{buildroot}%{_mandir}/man8/
  70. mkdir -p %{buildroot}/usr/src/%{name}-%{version}-%{release}
  71. cp -a driver/* %{buildroot}/usr/src/%{name}-%{version}-%{release}
  72. ## DKMS.CONF ##
  73. cat > %{buildroot}/usr/src/%{name}-%{version}-%{release}/dkms.conf <<EOF
  74. PACKAGE_NAME="%{name}"
  75. PACKAGE_VERSION="%{version}-%{release}"
  76. # Items below here should not have to change with each driver version
  77. MAKE[0]="make KVERS=\${kernelver} -C \${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build"
  78. CLEAN="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build clean"
  79. BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
  80. DEST_MODULE_LOCATION[0]="/extra/ndiswrapper"
  81. #MODULES_CONF_ALIAS_TYPE[0]="eth"
  82. REMAKE_INITRD="no"
  83. AUTOINSTALL="yes"
  84. EOF
  85. ## KMP.SPEC ##
  86. sed -e 's|##KMOD_NAME##|%{name}|g' \
  87. -e 's|##KMOD_VER##|%{version}-%{release}|g' \
  88. -e 's|##LICENSE##|%{license}|g' \
  89. %{SOURCE10} > \
  90. %{buildroot}/usr/src/%{name}-%{version}-%{release}/%{name}-kmp.spec
  91. %clean
  92. %__rm -rf %{buildroot}
  93. %post
  94. if [ -f /etc/modprobe.d/ndiswrapper ]; then
  95. mv /etc/modprobe.d/ndiswapper /etc/modprobe.d/ndiswapper.conf
  96. fi
  97. %post -n dkms-%{name}
  98. dkms add -m %{name} -v %{version}-%{release} --rpm_safe_upgrade
  99. dkms mkkmp -m %{name} -v %{version}-%{release}
  100. dkms build -m %{name} -v %{version}-%{release} --rpm_safe_upgrade
  101. dkms install -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --force
  102. exit 0
  103. %preun -n dkms-%{name}
  104. dkms remove -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all
  105. exit 0
  106. %files
  107. %defattr(-,root,root)
  108. %doc README AUTHORS ChangeLog INSTALL
  109. %{_syssbindir}/loadndisdriver
  110. %{_sbindir}/ndiswrapper*
  111. %{_mandir}/man8/ndiswrapper*
  112. %{_mandir}/man8/loadndisdriver*
  113. %files -n dkms-%{name}
  114. %defattr(-,root,root)
  115. %dir /usr/src/%{name}-%{version}-%{release}
  116. /usr/src/%{name}-%{version}-%{release}/*
  117. %changelog
  118. * Fri Sep 25 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.55-1
  119. - updated to 1.55, fixing compilation issues with recent kernels
  120. - add Patch2: fix one more compilation issue with kernel-2.6.31
  121. * Tue May 12 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.54-4
  122. - add Patch1: change modprobe conf name to ndiswrapper.conf
  123. * Sun Apr 26 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.54-3
  124. - add Source10 for mkkmp feature
  125. * Thu Apr 9 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.54-2
  126. - drop kernel-module-ndiswrapper subpackage; make DKMS-compatible
  127. * Tue Jan 28 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.54-1
  128. - new upstream release
  129. - add kflavor(pae,smp..) to package name
  130. * Thu Dec 11 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.53-1
  131. - new upstream release
  132. - add Patch1 to build for kernel 2.6.27
  133. * Wed Mar 26 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.52-1
  134. - new upstream release
  135. * Wed Dec 05 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.50-0vl1
  136. - new upstream release
  137. * Tue Oct 30 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.49-0vl1
  138. - new upstream release
  139. * Mon Oct 22 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.48-0vl1
  140. - new upstream release
  141. * Sat Jun 09 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.46-0vl1
  142. - new upstream rekease
  143. * Fri May 11 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.43-0vl1
  144. - new upstream release
  145. * Thu Oct 26 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.27-0vl1
  146. - new upstream release
  147. * Fri Oct 06 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.25-0vl1
  148. - new upstream release
  149. * Wed Sep 06 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.23-0vl2
  150. - fix typo of Group <BTS:VineLinux:148>.
  151. * Wed Aug 30 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.23-0vl1
  152. - new upstream release
  153. * Sun Aug 06 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.22-0vl1
  154. - new upstream release
  155. * Tue Jul 18 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.21-0vl2
  156. - run depmod for target kernel version
  157. - add PreReq: kernel >= %%{kversion}
  158. (we need System.map to run depmod in %%post script)
  159. * Tue Jul 18 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.21-0vl1
  160. - new upstream release
  161. * Sat Jul 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.19-0vl1
  162. - split kernel module to kernel-module-ndiswrapper subpackage
  163. to allow duplicated packages.
  164. - change Group to System Environment/Base for utils,
  165. System Environment/Kernel for kernel modules.
  166. - new upstream release
  167. * Thu May 04 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.15-0vl1
  168. - new upstream release
  169. * Sat Apr 24 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.14-0vl1
  170. - new upstream release
  171. * Tue Apr 04 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.11-0vl1
  172. - new upstream release
  173. - change Group to System Enviroment/Libraries.
  174. * Mon Mar 20 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.10-0vl1
  175. - new upstream release
  176. - add mandir to make install option
  177. - call depmod in %%post script
  178. * Sat Feb 04 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.9-0vl1
  179. - source update.
  180. * Thu Feb 02 2006 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.8-0vl1
  181. - source update.
  182. * Sun Dec 18 2005 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.7-0vl1
  183. - source update.
  184. * Sat Nov 19 2005 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.5-0vl1
  185. - source update.
  186. * Sun Oct 08 2005 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.4-0vl1
  187. - source update.
  188. - use '%%__make install' instead of %%maikeinstall macro.
  189. * Tue Aug 02 2005 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.2-0vl2
  190. - Delete unnecessary echo (only used for packaging test).
  191. * Thu Jul 29 2005 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.2-0vl1
  192. - initial build for VineSeed Plus.