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