]> git.pld-linux.org Git - packages/linux-gpib.git/blob - linux-gpib.spec
- up to 3.2.09,kernel build macros
[packages/linux-gpib.git] / linux-gpib.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # allow non-distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  userspace       # don't build userspace module
6 %bcond_with     verbose         # verbose build (V=1)
7 #
8 # main package.
9 #
10
11 %define         mod_name        gpib
12
13 %define         _rel    0.1
14 Summary:        GPIB Linux Support
15 Summary(pl.UTF-8):      Sterowniki GPIB dla Linuksa
16 Name:           linux-gpib
17 Version:        3.2.09
18 Release:        %{_rel}
19 License:        GPL
20 Group:          Applications/System
21 Source0:        http://dl.sourceforge.net/linux-gpib/%{name}-%{version}.tar.gz
22 # Source0-md5:  06636539e335ad126f7893db50368142
23 Patch0:         %{name}-include_file.patch
24 URL:            http://linux-gpib.sourceforge.net/
25 %if %{with kernel}
26 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 3:2.6.7}
27 BuildRequires:  rpmbuild(macros) >= 1.153
28 %endif
29 BuildRequires:  kernel-headers >= 2.6.8
30 BuildRequires:  python
31 Requires(pre,post):     kernel >= 2.6.8
32 Requires:       kernel-up >= 2.6.8
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 The Linux GPIB package provides support for GPIB (IEEE 488) hardware.
37
38 %description -l pl.UTF-8
39 Pakiet Linux GPIB służy do obsługi sprzętu GPIB (IEEE 488).
40
41 # kernel subpackages.
42
43 %package -n kernel-%{mod_name}
44 Summary:        Linux driver for %{name}
45 Summary(pl.UTF-8):      Sterownik dla Linuksa do %{name}
46 Release:        %{_rel}@%{_kernel_ver_str}
47 Group:          Base/Kernel
48 Requires(post,postun):  /sbin/depmod
49 %if %{with dist_kernel}
50 %requires_releq_kernel_up
51 Requires(postun):       %releq_kernel_up
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
59 %description -n kernel-%{mod_name} -l pl.UTF-8
60 Sterownik dla Linuksa do %{name}.
61
62 Ten pakiet zawiera moduł jądra Linuksa.
63
64 %prep
65 %setup -q
66 %patch0 -p1
67
68 %build
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}
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
90 %{__make}
91 %endif
92
93 #for i in tms9914 agilent_82350b agilent_82357a cb7210 hp82335 hp_82341 nec7210 tnt4882 cec ines pc2 sys ; do
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97
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
103 %if %{with userspace}
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
108 %endif
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %post -n kernel%{_alt_kernel}-%{mod_name}
114 %depmod %{_kernel_ver}
115
116 %postun -n kernel%{_alt_kernel}-%{mod_name}
117 %depmod %{_kernel_ver}
118
119 %if %{with kernel}
120 %files -n kernel%{_alt_kernel}-%{mod_name}
121 %defattr(644,root,root,755)
122 /lib/modules/%{_kernel_ver}/misc/*.ko*
123 %endif
This page took 0.066144 seconds and 4 git commands to generate.