]> git.pld-linux.org Git - SPECS.git/blob - touchkit.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / touchkit.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without kernel from distribution
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  userspace       # don't build userspace tools
6 #
7 Summary:        eGalax TouchKit drivers and utilities
8 Summary(pl.UTF-8):      Sterowniki i narzędzia do paneli dotykowych eGalax TouchKit
9 Name:           touchkit
10 Version:        1.0.2.2013
11 %define rel     1
12 Release:        %{rel}
13 License:        ?  Copyright(c) 2000 - 2003, eGalax Inc. All Right Reserved.
14 Group:          Applications/System
15 # is it distributable???
16 #URL list on    http://www.egalax.com.tw/Download.htm
17 Source0:        http://www.egalax.com.tw/Beta/TouchKit_Linux_%{version}.zip
18 # NoSource0-md5:        e9c65210577003948eb676a84712589c
19 Source1:        http://www.egalax.com.tw/NEWTouchKitv33.pdf
20 # NoSource1-md5:        1df5e69c04747d0e34cb8b68cdcccb93
21 Source2:        http://www.egalax.com.tw/Document/TouchKit%20Manual%20for%20Linux%20v3.1.4.pdf
22 # NoSource2-md5:        c6a78751d6f2c5d789d90533651d17d6
23 Source3:        http://www.egalax.com.tw/SoftwareProgrammingGuide_1.1.pdf
24 # NoSource3-md5:        7c9d12b5ef9aec190748d00b351728c8
25 # no license information anywhere... don't know if distributable :/
26 NoSource:       0
27 NoSource:       1
28 NoSource:       2
29 NoSource:       3
30 Patch0:         %{name}-lessmess.patch
31 Patch1:         %{name}-gcc33.patch
32 URL:            http://www.egalax.com.tw/
33 BuildRequires:  XFree86-Xserver-devel > 4.3.99.902-0.1
34 BuildRequires:  XFree86-devel
35 %if %{with kernel}
36 BuildRequires:  %{kgcc_package}
37 %{?with_dist_kernel:BuildRequires:      kernel-headers < 2.5}
38 %endif
39 BuildRequires:  rpmbuild(macros) >= 1.118
40 BuildRequires:  sharutils
41 BuildRequires:  tcl
42 BuildRequires:  unzip
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 eGalax TouchKit drivers and utilities.
47
48 %description -l pl.UTF-8
49 Sterowniki i narzędzia do paneli dotykowych eGalax TouchKit.
50
51 %package utils
52 Summary:        eGalax TouchKit utilities
53 Summary(pl.UTF-8):      Narzędzia do paneli dotykowych eGalax TouchKit
54 Group:          Applications/System
55 Requires:       tk
56
57 %description utils
58 eGalax TouchKit utilities (both command line and GUI).
59
60 %description utils -l pl.UTF-8
61 Narzędzia do paneli dotykowych eGalax TouchKit (działające z linii
62 poleceń oraz z graficznym interfejsem).
63
64 %package -n XFree86-input-touchkit
65 Summary:        XFree86 input driver module for eGalax TouchKit panels
66 Summary(pl.UTF-8):      Moduł sterownika wejściowego XFree86 dla paneli dotykowych eGalax TouchKit
67 Group:          X11
68 %{requires_eq_to XFree86-modules XFree86-Xserver-devel}
69
70 %description -n XFree86-input-touchkit
71 XFree86 input driver module for eGalax TouchKit panels.
72
73 %description -n XFree86-input-touchkit -l pl.UTF-8
74 Moduł sterownika wejściowego XFree86 dla paneli dotykowych eGalax
75 TouchKit.
76
77 %package -n kernel-usb-touchkit
78 Summary:        Linux driver for eGalax TouchKit USB panels
79 Summary(pl.UTF-8):      Sterownik Linuksa dla paneli dotykowych USB eGalax TouchKit
80 Release:        %{_rel}@%{_kernel_ver_str}
81 Group:          Base/Kernel
82 %{?with_dist_kernel:%requires_releq_kernel_up}
83 Requires(post,postun):  /sbin/depmod
84
85 %description -n kernel-usb-touchkit
86 Linux driver for eGalax TouchKit panels with USB connector.
87
88 %description -n kernel-usb-touchkit -l pl.UTF-8
89 Sterownik Linuksa dla paneli dotykowych eGalax TouchKit w wersji
90 podłączanej przez USB.
91
92 %package -n kernel-smp-usb-touchkit
93 Summary:        Linux SMP driver for eGalax TouchKit USB panels
94 Summary(pl.UTF-8):      Sterownik Linuksa SMP dla paneli dotykowych USB eGalax TouchKit
95 Release:        %{_rel}@%{_kernel_ver_str}
96 Group:          Base/Kernel
97 %{?with_dist_kernel:%requires_releq_kernel_smp}
98 Requires(post,postun):  /sbin/depmod
99
100 %description -n kernel-smp-usb-touchkit
101 Linux SMP driver for eGalax TouchKit panels with USB connector.
102
103 %description -n kernel-smp-usb-touchkit -l pl.UTF-8
104 Sterownik Linuksa SMP dla paneli dotykowych eGalax TouchKit w wersji
105 podłączanej przez USB.
106
107 %prep
108 %setup -q -n TouchKit_Linux
109 uudecode touchkit.setupr8nm.sh -o /dev/stdout | tar xzf -
110 %patch0 -p0
111 %patch1 -p0
112
113 cp %{SOURCE1} %{SOURCE3} .
114 # no spaces please
115 cp %{SOURCE2} TouchKit_Manual_for_Linux_v3.1.4.pdf
116
117 rm -f touchkit/xf86drv/bin/*
118
119 echo 'puts 401' > touchkit/utility/xversion.tcl
120
121 %build
122 %{__make} rebuild -C touchkit \
123         SUBDIRS=include
124
125 %if %{with kernel}
126 %{__make} do_build_module -C touchkit/usb \
127         KGCC="%{kgcc}" \
128         OPT="%{rpmcflags}" \
129         LINUX_PATH="%{_kernelsrcdir}"
130 %endif
131
132 %if %{with userspace}
133 %{__make} usbpnpd -C touchkit/usb \
134         CC="%{__cc}" \
135         OPT="%{rpmcflags}"
136
137 %{__make} rebuild -C touchkit \
138         SUBDIRS="driver utility diag" \
139         CC="%{__cc}" \
140         OPT="%{rpmcflags}"
141
142 cp -f touchkit/xf86drv/Imakefile{.401a,}
143 # note: "/" at the end is important
144 %{__make} -C touchkit/xf86drv Makefile touchkit_drv.o \
145         XF86SRC.401=/usr/X11R6/include/X11/Xserver/ \
146         CDEBUGFLAGS="%{rpmcflags} -I/usr/X11R6/include/X11"
147 %endif
148
149 %install
150 rm -rf $RPM_BUILD_ROOT
151
152 %if %{with userspace}
153 %{__make} install -C touchkit \
154         DESTDIR=$RPM_BUILD_ROOT
155
156 V="0123 3823 3823 0EEF 0EEF"
157 P="0001 0001 0002 0001 0002"
158 cat > $RPM_BUILD_ROOT/etc/usbpnpd.conf <<EOF
159 #Device = VendorID, ProductID, ActionIfPlugIn
160 Device = 0x0123, 0x0001, insmod tkusb vidlist="$V" pidlist="$P"; /usr/bin/tpaneld &
161 Device = 0x3823, 0x0001, insmod tkusb vidlist="$V" pidlist="$P"; /usr/bin/tpaneld &
162 Device = 0x3823, 0x0002, insmod tkusb vidlist="$V" pidlist="$P"; /usr/bin/tpaneld &
163 Device = 0x0EEF, 0x0001, insmod tkusb vidlist="$V" pidlist="$P"; /usr/bin/tpaneld &
164 Device = 0x0EEF, 0x0002, insmod tkusb vidlist="$V" pidlist="$P"; /usr/bin/tpaneld &
165 EOF
166 %endif
167
168 %if %{with kernel}
169 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
170 install touchkit/usb/tkusb.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
171 install touchkit/usb/tkusb-smp.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/tkusb.o
172 %endif
173
174 %clean
175 rm -rf $RPM_BUILD_ROOT
176
177 %post   -n kernel-usb-touchkit
178 %depmod %{_kernel_ver}
179
180 %postun -n kernel-usb-touchkit
181 %depmod %{_kernel_ver}
182
183 %post   -n kernel-smp-usb-touchkit
184 %depmod %{_kernel_ver}smp
185
186 %postun -n kernel-smp-usb-touchkit
187 %depmod %{_kernel_ver}smp
188
189 %if %{with userspace}
190 %files utils
191 %defattr(644,root,root,755)
192 %doc *.pdf
193 %attr(755,root,root) %{_bindir}/*
194 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/usbpnpd.conf
195 %dir %{_libdir}/TouchKit
196 %attr(755,root,root) %{_libdir}/TouchKit/touchcfg
197 %attr(755,root,root) %{_libdir}/TouchKit/tpaneld
198 %attr(755,root,root) %{_libdir}/TouchKit/usbpnpd
199 %dir %{_libdir}/TouchKit/diag
200 %attr(755,root,root) %{_libdir}/TouchKit/diag/*pcal
201 %attr(755,root,root) %{_libdir}/TouchKit/diag/drawtest
202 %attr(755,root,root) %{_libdir}/TouchKit/diag/*.tcl
203 %{_libdir}/TouchKit/diag/*.txt
204 %{_libdir}/TouchKit/image
205 %{_libdir}/TouchKit/include
206 %attr(755,root,root) %{_libdir}/TouchKit/utility
207
208 %files -n XFree86-input-touchkit
209 %defattr(644,root,root,755)
210 %attr(755,root,root) /usr/X11R6/lib/modules/input/touchkit_drv.o
211 %endif
212
213 %if %{with kernel}
214 %files -n kernel-usb-touchkit
215 %defattr(644,root,root,755)
216 /lib/modules/%{_kernel_ver}/misc/tkusb.o*
217
218 %files -n kernel-smp-usb-touchkit
219 %defattr(644,root,root,755)
220 /lib/modules/%{_kernel_ver}smp/misc/tkusb.o*
221 %endif
This page took 0.469176 seconds and 3 git commands to generate.