]> git.pld-linux.org Git - packages/linux-gpib.git/blame - linux-gpib.spec
- up to 3.2.09,kernel build macros
[packages/linux-gpib.git] / linux-gpib.spec
CommitLineData
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 14Summary: GPIB Linux Support
0dd3467a 15Summary(pl.UTF-8): Sterowniki GPIB dla Linuksa
d4054fe9 16Name: linux-gpib
8eefbf3b 17Version: 3.2.09
d4054fe9 18Release: %{_rel}
d4054fe9 19License: GPL
cc64c2aa
JB
20Group: Applications/System
21Source0: http://dl.sourceforge.net/linux-gpib/%{name}-%{version}.tar.gz
8eefbf3b
MWP
22# Source0-md5: 06636539e335ad126f7893db50368142
23Patch0: %{name}-include_file.patch
d4054fe9 24URL: http://linux-gpib.sourceforge.net/
25%if %{with kernel}
66b36318 26%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.7}
d4054fe9 27BuildRequires: rpmbuild(macros) >= 1.153
28%endif
29BuildRequires: kernel-headers >= 2.6.8
3c225e36 30BuildRequires: python
d4054fe9 31Requires(pre,post): kernel >= 2.6.8
d7b3679a 32Requires: kernel-up >= 2.6.8
d4054fe9 33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
cc64c2aa 36The Linux GPIB package provides support for GPIB (IEEE 488) hardware.
d4054fe9 37
bc9733fa
JR
38%description -l pl.UTF-8
39Pakiet 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 44Summary: Linux driver for %{name}
0dd3467a 45Summary(pl.UTF-8): Sterownik dla Linuksa do %{name}
0e4898e2
ER
46Release: %{_rel}@%{_kernel_ver_str}
47Group: Base/Kernel
48Requires(post,postun): /sbin/depmod
d7b3679a 49%if %{with dist_kernel}
50%requires_releq_kernel_up
0e4898e2 51Requires(postun): %releq_kernel_up
d7b3679a 52%endif
53
54%description -n kernel-%{mod_name}
55This is driver for %{name} for Linux.
56
57This package contains Linux module.
58
bc9733fa 59%description -n kernel-%{mod_name} -l pl.UTF-8
d7b3679a 60Sterownik dla Linuksa do %{name}.
61
bc9733fa 62Ten 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%{__}
71TOPDIR="`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
96rm -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
111rm -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
This page took 0.374951 seconds and 4 git commands to generate.