]> git.pld-linux.org Git - packages/linux-gpib.git/blob - linux-gpib.spec
- NFY
[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 %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
16 #
17 # main package.
18 #
19
20 %define         mod_name        gpib
21
22 %define         _rel    0.1
23 Summary:        GPIB Linux Support
24 Summary(pl.UTF-8):      Sterowniki GPIB dla Linuksa
25 Name:           linux-gpib
26 Version:        3.2.15
27 Release:        %{_rel}
28 License:        GPL
29 Group:          Applications/System
30 Source0:        http://dl.sourceforge.net/linux-gpib/%{name}-%{version}.tar.gz
31 # Source0-md5:  cc90a7d6738953230bd24a18188ac2f5
32 Patch0:         %{name}-include_file.patch
33 URL:            http://linux-gpib.sourceforge.net/
34 %if %{with kernel}
35 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 3:2.6.7}
36 BuildRequires:  rpmbuild(macros) >= 1.153
37 %endif
38 BuildRequires:  kernel-headers >= 2.6.8
39 BuildRequires:  python
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
46 Requires(pre,post):     kernel >= 2.6.8
47 Requires:       kernel-up >= 2.6.8
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %description
51 The Linux GPIB package provides support for GPIB (IEEE 488) hardware.
52
53 %description -l pl.UTF-8
54 Pakiet Linux GPIB służy do obsługi sprzętu GPIB (IEEE 488).
55
56 # kernel subpackages.
57
58 %package -n kernel-%{mod_name}
59 Summary:        Linux driver for %{name}
60 Summary(pl.UTF-8):      Sterownik dla Linuksa do %{name}
61 Release:        %{_rel}@%{_kernel_ver_str}
62 Group:          Base/Kernel
63 Requires(post,postun):  /sbin/depmod
64 %if %{with dist_kernel}
65 %requires_releq_kernel_up
66 Requires(postun):       %releq_kernel_up
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
74 %description -n kernel-%{mod_name} -l pl.UTF-8
75 Sterownik dla Linuksa do %{name}.
76
77 Ten pakiet zawiera moduł jadra
78
79 %prep
80 %setup -q
81 %patch0 -p1
82
83 %build
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}
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
105 %{__make}
106 ##%endif
107
108 #for i in tms9914 agilent_82350b agilent_82357a cb7210 hp82335 hp_82341 nec7210 tnt4882 cec ines pc2 sys ; do
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
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
118 %if %{with userspace}
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
123 %endif
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post -n kernel%{_alt_kernel}-%{mod_name}
129 %depmod %{_kernel_ver}
130
131 %postun -n kernel%{_alt_kernel}-%{mod_name}
132 %depmod %{_kernel_ver}
133
134 %if %{with kernel}
135 %files -n kernel%{_alt_kernel}-%{mod_name}
136 %defattr(644,root,root,755)
137 /lib/modules/%{_kernel_ver}/misc/*.ko*
138 %endif
This page took 0.066614 seconds and 4 git commands to generate.