]> git.pld-linux.org Git - packages/configure-trackpoint.git/blob - configure-trackpoint.spec
- tabs in preamble
[packages/configure-trackpoint.git] / configure-trackpoint.spec
1 #
2 # Conditional build:
3 %bcond_without  gnome   # don't build gnome configurator
4 #
5 %define         _name   trackpoint
6 Summary:        TrackPoint configuration service for IBM laptops
7 Summary(pl.UTF-8):      Usługa konfigurująca TrackPointa do laptopów IBM
8 Name:           configure-trackpoint
9 Version:        0.3.3
10 Release:        2
11 License:        GPL v2
12 Group:          X11/Applications
13 Source0:        http://dl.sourceforge.net/tpctl/%{name}-%{version}.tar.gz
14 # Source0-md5:  081b361f77d8510f3dab293b58d7a30d
15 Source1:        %{name}.init
16 Patch0:         %{name}-desktop.patch
17 Patch1:         %{name}-makefile.patch
18 URL:            http://tpctl.sourceforge.net/
19 %if %{with gnome}
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 BuildRequires:  libgnomeui-devel
23 BuildRequires:  pkgconfig
24 %endif
25 Requires(post,preun):   /sbin/chkconfig
26 Requires:       rc-scripts
27 # trackpoint subsystem via sysfs
28 #Requires:      uname(release) >= 2.6.11
29 ExclusiveArch:  %{ix86}
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 TrackPoint configuration service for IBM laptops.
34
35 %description -l pl.UTF-8
36 Usługa konfigurująca TrackPointa do laptopów IBM.
37
38 %package gnome
39 Summary:        GNOME TrackPoint configuration tool for IBM laptops
40 Summary(pl.UTF-8):      Narzędzie konfiguracyjne TrackPointa do laptopów IBM
41 Group:          X11/Applications
42 Requires:       %{name} = %{version}-%{release}
43
44 %description gnome
45 GNOME TrackPoint configuration tool for IBM laptops.
46
47 %description gnome -l pl.UTF-8
48 Narzędzie konfiguracyjne TrackPointa do laptopów IBM.
49
50 %prep
51 %setup -q
52 %patch0 -p1
53 %patch1 -p1
54
55 %build
56 %if %{with gnome}
57 %{__aclocal}
58 %{__autoconf}
59 %{__automake}
60 %configure
61 %{__make}
62 %endif
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/%{_name}}
67
68 %if %{with gnome}
69 %{__make} install \
70         DESTDIR=$RPM_BUILD_ROOT
71
72 ln -sf %{name}/%{_name}.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
73 %endif
74
75 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{_name}
76 install etc/trackpoint/trackpoint.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{_name}/%{_name}.conf
77 > $RPM_BUILD_ROOT%{_sysconfdir}/%{_name}/%{_name}.conf.bak
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %post
83 /sbin/chkconfig --add %{_name}
84 %service %{_name} restart
85
86 %preun
87 if [ "$1" = "0" ]; then
88         %service -q %{_name} stop
89         /sbin/chkconfig --del %{_name}
90 fi
91
92 %files
93 %defattr(644,root,root,755)
94 %doc AUTHORS ChangeLog
95 %attr (754,root,root) /etc/rc.d/init.d/%{_name}
96 %dir %{_sysconfdir}/%{_name}
97 %attr (754,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{_name}/%{_name}.conf
98 %attr (754,root,root) %ghost %{_sysconfdir}/%{_name}/%{_name}.conf.bak
99
100 %if %{with gnome}
101 %files gnome
102 %defattr(644,root,root,755)
103 %attr(755,root,root) %{_bindir}/*
104 %{_desktopdir}/*.desktop
105 %{_pixmapsdir}/*
106 %endif
This page took 0.073053 seconds and 3 git commands to generate.