[1617] | 1 | %define oname hybrid-portsrc |
---|
| 2 | %define over %(echo %{version} | tr . _) |
---|
| 3 | %define kname wl |
---|
| 4 | |
---|
| 5 | Summary: Proprietary driver for Broadcom wireless adapters |
---|
| 6 | Summary(ja): Broadcom ワイヤレスドライバ用プロプライエタリドライバ |
---|
| 7 | Name: broadcom-wl |
---|
| 8 | Version: ##VERSION## |
---|
| 9 | Release: ##RELEASE## |
---|
| 10 | %ifarch %{ix86} |
---|
[2433] | 11 | Source0: http://www.broadcom.com/docs/linux_sta/%{oname}_x86_32-v%{over}.tar.gz |
---|
[1617] | 12 | %endif |
---|
| 13 | %ifarch x86_64 |
---|
[2433] | 14 | Source0: http://www.broadcom.com/docs/linux_sta/%{oname}_x86_64-v%{over}.tar.gz |
---|
[1617] | 15 | %endif |
---|
| 16 | Source1: blacklist-broadcom.conf |
---|
[4607] | 17 | Source2: 5_100_82_38.patch |
---|
[1617] | 18 | |
---|
| 19 | License: Freeware and GPLv2 with exception |
---|
| 20 | Group: System Environment/Kernel |
---|
| 21 | URL: http://www.broadcom.com/support/802.11/linux_sta.php |
---|
| 22 | |
---|
| 23 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 24 | |
---|
| 25 | %description |
---|
| 26 | This package contains the proprietary driver for Broadcom wireless adapters |
---|
| 27 | provided by Broadcom. If installed, it will be used for these cards in |
---|
| 28 | preference to the third-party open source driver that requires manual |
---|
| 29 | installation of firmware, or ndiswrapper. |
---|
| 30 | |
---|
| 31 | %description -l ja |
---|
| 32 | このパッケージには、Broadcom ワイヤレスアダプタ用のプロプライエタリドライバが |
---|
| 33 | 収録されています。ファームウェアのインストールを手で行わなければいけない |
---|
| 34 | オープンソースドライバや ndiswrapper とは異なり、この Broadcom 社製の |
---|
| 35 | ハイブリッドドライバは単体で動作します。 |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | %package -n dkms-%{name} |
---|
| 39 | Summary: Hybrid kernel module f-r Broadcom wireless adapters |
---|
| 40 | Summary(ja): Broadcom ワイヤレスドライバ用ハイブリッドカーネルモジュール |
---|
| 41 | Group: System Environment/Kernel |
---|
| 42 | Requires(post): dkms |
---|
| 43 | Requires(preun): dkms |
---|
| 44 | |
---|
| 45 | %description -n dkms-%{name} |
---|
| 46 | This package contains the proprietary driver for Broadcom wireless adapters |
---|
| 47 | provided by Broadcom. If installed, it will be used for these cards in |
---|
| 48 | preference to the third-party open source driver that requires manual |
---|
| 49 | installation of firmware, or ndiswrapper. |
---|
| 50 | |
---|
| 51 | %description -n dkms-%{name} -l ja |
---|
| 52 | このパッケージには、Broadcom ワイヤレスアダプタ用のプロプライエタリドライバが |
---|
| 53 | 収録されています。ファームウェアのインストールを手で行わなければいけない |
---|
| 54 | オープンソースドライバや ndiswrapper とは異なり、この Broadcom 社製の |
---|
| 55 | ハイブリッドドライバは単体で動作します。 |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | %prep |
---|
| 59 | %setup -q -T -c -a0 %{oname} |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | %install |
---|
| 63 | %{__rm} -rf %{buildroot} |
---|
| 64 | |
---|
| 65 | ## DKMS ## |
---|
| 66 | mkdir -p %{buildroot}%{_usr}/src/%{name}-%{version}-%{release} |
---|
| 67 | cp -R * %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/ |
---|
| 68 | cat > %{buildroot}%{_usr}/src/%{name}-%{version}-%{release}/dkms.conf << EOF |
---|
| 69 | PACKAGE_NAME=%{name} |
---|
| 70 | PACKAGE_VERSION=%{version}-%{release} |
---|
| 71 | |
---|
| 72 | BUILT_MODULE_NAME="%{kname}" |
---|
| 73 | BUILT_MODULE_LOCATION="." |
---|
| 74 | DEST_MODULE_LOCATION="/extra/broadcom" |
---|
[4607] | 75 | PATCH[0]="5_100_82_38.patch" |
---|
[2433] | 76 | #PATCH_MATCH[0]="^2.6.(3[5-9]|[4-9][0-9])" |
---|
[1617] | 77 | |
---|
| 78 | MAKE="make -C \$kernel_source_dir M=\\\$(pwd)" |
---|
| 79 | CLEAN="make -C \$kernel_source_dir M=\\\$(pwd) clean" |
---|
| 80 | |
---|
| 81 | AUTOINSTALL="yes" |
---|
| 82 | EOF |
---|
| 83 | |
---|
| 84 | ## BLACKLIST ## |
---|
| 85 | mkdir -p %{buildroot}/etc/modprobe.d |
---|
| 86 | install -m 644 %{SOURCE1} %{buildroot}/etc/modprobe.d/ |
---|
| 87 | |
---|
[2433] | 88 | mkdir -p %{buildroot}/usr/src/%{name}-%{version}-%{release}/patches/ |
---|
[4607] | 89 | install -m 644 %{SOURCE2} %{buildroot}/usr/src/%{name}-%{version}-%{release}/patches/ |
---|
[1617] | 90 | |
---|
[2433] | 91 | |
---|
[1617] | 92 | %clean |
---|
| 93 | %{__rm} -rf %{buildroot} |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | %post -n dkms-%{name} |
---|
| 97 | dkms add -m %{name} -v %{version}-%{release} --rpm_safe_upgrade |
---|
| 98 | dkms build -m %{name} -v %{version}-%{release} --rpm_safe_upgrade |
---|
| 99 | dkms install -m %{name} -v %{version}-%{release} --rpm_safe_upgrade |
---|
| 100 | exit 0 |
---|
| 101 | |
---|
| 102 | %preun -n dkms-%{name} |
---|
| 103 | dkms remove -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all || : |
---|
| 104 | |
---|
| 105 | |
---|
| 106 | %files -n dkms-%{name} |
---|
| 107 | %defattr(-,root,root) |
---|
| 108 | %doc lib/LICENSE.txt |
---|
| 109 | %dir /usr/src/%{name}-%{version}-%{release} |
---|
| 110 | /usr/src/%{name}-%{version}-%{release}/* |
---|
| 111 | /etc/modprobe.d/blacklist-broadcom.conf |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | %changelog |
---|
| 115 | * Tue May 05 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - ##VERSION##-##RELEASE## |
---|
| 116 | - initial build for Vine Linux |
---|