ndiswrapper-vl.spec 8.5 KB

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