]>
Commit | Line | Data |
---|---|---|
d4054fe9 | 1 | # |
d4054fe9 | 2 | # Conditional build: |
3 | %bcond_without dist_kernel # allow non-distribution kernel | |
4 | %bcond_without kernel # don't build kernel modules | |
d4054fe9 | 5 | %bcond_without userspace # don't build userspace module |
6 | %bcond_with verbose # verbose build (V=1) | |
df990a65 | 7 | |
8 | %bcond_without guile # | |
9 | %bcond_without perl | |
10 | %bcond_without php | |
11 | %bcond_without python | |
12 | %bcond_without tcl | |
13 | ||
14 | %bcond_without docs | |
15 | ||
d4054fe9 | 16 | # |
17 | # main package. | |
18 | # | |
d7b3679a | 19 | |
20 | %define mod_name gpib | |
21 | ||
0e4898e2 | 22 | %define _rel 0.1 |
d4054fe9 | 23 | Summary: GPIB Linux Support |
0dd3467a | 24 | Summary(pl.UTF-8): Sterowniki GPIB dla Linuksa |
d4054fe9 | 25 | Name: linux-gpib |
a1b3352a | 26 | Version: 3.2.15 |
d4054fe9 | 27 | Release: %{_rel} |
d4054fe9 | 28 | License: GPL |
cc64c2aa JB |
29 | Group: Applications/System |
30 | Source0: http://dl.sourceforge.net/linux-gpib/%{name}-%{version}.tar.gz | |
a1b3352a | 31 | # Source0-md5: cc90a7d6738953230bd24a18188ac2f5 |
8eefbf3b | 32 | Patch0: %{name}-include_file.patch |
d4054fe9 | 33 | URL: http://linux-gpib.sourceforge.net/ |
34 | %if %{with kernel} | |
66b36318 | 35 | %{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.7} |
d4054fe9 | 36 | BuildRequires: rpmbuild(macros) >= 1.153 |
37 | %endif | |
38 | BuildRequires: kernel-headers >= 2.6.8 | |
3c225e36 | 39 | BuildRequires: python |
df990a65 | 40 | %{?with_guile:BuildRequires: guile-devel} |
41 | %{?with_perl:BuildRequires: perl-devel} | |
42 | %{?with_php:BuildRequires: php-devel} | |
43 | %{?with_python:BuildRequires: python-devel} | |
44 | %{?with_tcl:BuildRequires: tcl-devel} | |
45 | ||
d4054fe9 | 46 | Requires(pre,post): kernel >= 2.6.8 |
d7b3679a | 47 | Requires: kernel-up >= 2.6.8 |
d4054fe9 | 48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
50 | %description | |
cc64c2aa | 51 | The Linux GPIB package provides support for GPIB (IEEE 488) hardware. |
d4054fe9 | 52 | |
bc9733fa JR |
53 | %description -l pl.UTF-8 |
54 | Pakiet Linux GPIB służy do obsługi sprzętu GPIB (IEEE 488). | |
d4054fe9 | 55 | |
56 | # kernel subpackages. | |
d7b3679a | 57 | |
58 | %package -n kernel-%{mod_name} | |
0e4898e2 | 59 | Summary: Linux driver for %{name} |
0dd3467a | 60 | Summary(pl.UTF-8): Sterownik dla Linuksa do %{name} |
0e4898e2 ER |
61 | Release: %{_rel}@%{_kernel_ver_str} |
62 | Group: Base/Kernel | |
63 | Requires(post,postun): /sbin/depmod | |
d7b3679a | 64 | %if %{with dist_kernel} |
65 | %requires_releq_kernel_up | |
0e4898e2 | 66 | Requires(postun): %releq_kernel_up |
d7b3679a | 67 | %endif |
68 | ||
69 | %description -n kernel-%{mod_name} | |
70 | This is driver for %{name} for Linux. | |
71 | ||
72 | This package contains Linux module. | |
73 | ||
bc9733fa | 74 | %description -n kernel-%{mod_name} -l pl.UTF-8 |
d7b3679a | 75 | Sterownik dla Linuksa do %{name}. |
76 | ||
df990a65 | 77 | Ten pakiet zawiera moduł jadra |
d7b3679a | 78 | |
d4054fe9 | 79 | %prep |
d7b3679a | 80 | %setup -q |
8eefbf3b | 81 | %patch0 -p1 |
d7b3679a | 82 | |
d4054fe9 | 83 | %build |
df990a65 | 84 | ##%if %{with kernel} |
85 | ##%{__} | |
86 | ##TOPDIR="`pwd`/drivers/gpib" | |
87 | ##%build_kernel_modules -C drivers/gpib -m gpib_common,cec_gpib,ines_gpib,pc2_gpib \ | |
88 | ## CFLAGS="%{rpmcflags} -I$TOPDIR/include -I$TOPDIR/o/include/asm/mach-default" | |
89 | ##%endif | |
90 | ||
91 | ##%if %{with userspace} | |
d7b3679a | 92 | %{__aclocal} -I m4 |
93 | %{__libtoolize} | |
94 | %{__autoconf} | |
95 | %{__automake} | |
96 | ||
97 | %configure \ | |
98 | --disable-guile-binding \ | |
99 | --disable-perl-binding \ | |
100 | --disable-php-binding \ | |
101 | --disable-python-binding \ | |
102 | --disable-tcl-binding \ | |
103 | --disable-documentation | |
104 | ||
9e3b7024 | 105 | %{__make} |
df990a65 | 106 | ##%endif |
d7b3679a | 107 | |
8eefbf3b | 108 | #for i in tms9914 agilent_82350b agilent_82357a cb7210 hp82335 hp_82341 nec7210 tnt4882 cec ines pc2 sys ; do |
d4054fe9 | 109 | |
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
8eefbf3b MWP |
113 | %if %{with kernel} |
114 | %install_kernel_modules -d misc -m gpib_common,cec_gpib,ines_gpib,pc2_gpib | |
115 | #for i in agilent_82350b agilent_82357a cb7210 hp82335 hp_82341 nec7210 tms9914 tnt4882 cec ines pc2 sys; do | |
116 | %endif | |
117 | ||
d4054fe9 | 118 | %if %{with userspace} |
9e3b7024 | 119 | %{__make} install \ |
120 | DESTDIR=$RPM_BUILD_ROOT \ | |
121 | HOTPLUG_USB_CONF_DIR=$RPM_BUILD_ROOT$HOTPLUG_USB_CONF_DIR \ | |
122 | USB_FIRMWARE_DIR=$RPM_BUILD_ROOT$USB_FIRMWARE_DIR | |
d4054fe9 | 123 | %endif |
124 | ||
d4054fe9 | 125 | %clean |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
8eefbf3b | 128 | %post -n kernel%{_alt_kernel}-%{mod_name} |
d4054fe9 | 129 | %depmod %{_kernel_ver} |
130 | ||
8eefbf3b | 131 | %postun -n kernel%{_alt_kernel}-%{mod_name} |
d4054fe9 | 132 | %depmod %{_kernel_ver} |
133 | ||
d4054fe9 | 134 | %if %{with kernel} |
8eefbf3b | 135 | %files -n kernel%{_alt_kernel}-%{mod_name} |
0e4898e2 | 136 | %defattr(644,root,root,755) |
ab08be88 | 137 | /lib/modules/%{_kernel_ver}/misc/*.ko* |
1fc85825 | 138 | %endif |