-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinput-pad.spec.in
163 lines (136 loc) · 4.21 KB
/
input-pad.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
%{!?have_pygobject3_devel: %define have_pygobject3_devel %(rpm -q --quiet gobject-introspection-devel && echo 1 || echo 0)}
%{!?have_xtest_devel: %define have_xtest_devel %(rpm -q --quiet libXtst-devel && echo 1 || echo 0)}
%{!?have_eek_devel: %define have_eek_devel %(rpm -q --quiet eekboard-devel && echo 1 || echo 0)}
%define sub_version @libinput_pad_VERSION@
%define libxklavier_version 4.0
%define libxml2_version 2.0
%define gtk3_version 3.10
%define libinput_paddir %{_libdir}/%{name}-%sub_version
%define moduledir %{_libdir}/%{name}-%sub_version/modules
%define kbduidir %{_libdir}/%{name}-%sub_version/modules/kbdui
%define xkeysenddir %{_libdir}/%{name}-%sub_version/modules/xkeysend
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 1%{?dist}
Summary: On-screen Input Pad to Send Characters with Mouse
License: LGPLv2+
Group: System Environment/Libraries
URL: http://code.google.com/p/input-pad/
Source0: http://input-pad.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext-devel
BuildRequires: gtk3-devel >= %gtk3_version
BuildRequires: libtool
BuildRequires: libxkbfile-devel
BuildRequires: libxklavier-devel >= %libxklavier_version
BuildRequires: libxml2-devel >= %libxml2_version
BuildRequires: intltool
BuildRequires: pkgconfig
%if %have_xtest_devel
BuildRequires: libXtst-devel
%endif
%if %have_pygobject3_devel
BuildRequires: gobject-introspection-devel
%endif
%if %have_eek_devel
BuildRequires: eekboard-devel
%endif
%if %have_pygobject3_devel
Requires: gobject-introspection
Requires: pygobject3
%endif
%description
The input pad is a tool to send a character on button to text applications.
%package devel
Summary: Development tools for input-pad
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The input-pad-devel package contains the header files.
%if %have_xtest_devel
%package xtest
Summary: Input Pad with XTEST extension
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description xtest
The input-pad-xtest package contains XTEST extension module
%endif
%if %have_eek_devel
%package eek
Summary: Input Pad with eekboard extension
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description eek
The input-pad-eek package contains eekboard extension module
%endif
%prep
%setup -q
%build
%configure \
%if %have_eek_devel
--enable-eek \
%endif
%if %have_xtest_devel
--enable-xtest \
%endif
--disable-static
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
if [ ! -d $RPM_BUILD_ROOT%kbduidir ] ; then
mkdir -p $RPM_BUILD_ROOT%kbduidir
fi
if [ ! -d $RPM_BUILD_ROOT%xkeysenddir ] ; then
mkdir -p $RPM_BUILD_ROOT%xkeysenddir
fi
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
%if %have_xtest_devel
rm -f $RPM_BUILD_ROOT%xkeysenddir/*.la
rm -f $RPM_BUILD_ROOT%xkeysenddir/*.a
%endif
%if %have_eek_devel
rm -f $RPM_BUILD_ROOT%kbduidir/*.la
rm -f $RPM_BUILD_ROOT%kbduidir/*.a
%endif
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%{_bindir}/input-pad
%dir %libinput_paddir
%dir %moduledir
%dir %xkeysenddir
%dir %kbduidir
%{_libdir}/libinput-pad-*.so.*
%if %have_pygobject3_devel
%{_libdir}/girepository-1.0/InputPad-%{sub_version}.typelib
%endif
%{_datadir}/%name
%{_datadir}/pixmaps/input-pad.png
%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}-%sub_version
%{_libdir}/libinput-pad-*.so
%{_libdir}/pkgconfig/*.pc
%if %have_pygobject3_devel
%{_datadir}/gir-1.0/InputPad-%{sub_version}.gir
%endif
%if %have_xtest_devel
%files xtest
%defattr(-,root,root,-)
%xkeysenddir/libinput-pad-xtest-gdk.so
%endif
%if %have_eek_devel
%files eek
%defattr(-,root,root,-)
%kbduidir/libinput-pad-eek-gtk.so
%endif
%changelog
* @DATE_DISPLAY@ Takao Fujiwara <[email protected]> - @PACKAGE_VERSION@-1
- Current version.