ndiswrapper-vl.spec 8.3 KB

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