File: input-pad.spec.in

package info (click to toggle)
input-pad 1.0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,220 kB
  • sloc: sh: 11,468; ansic: 8,465; python: 860; makefile: 461
file content (198 lines) | stat: -rw-r--r-- 5,308 bytes parent folder | download | duplicates (3)
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
%{!?have_pygobject3_devel: %define have_pygobject3_devel %(rpm -q --quiet gobject-introspection-devel && echo 1 || echo 0)}
%{!?have_pygobject2_devel: %define have_pygobject2_devel %(rpm -q --quiet python-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)}

%if %have_pygobject2_devel
  %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
  %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  %endif
%endif

%define sub_version             @libinput_pad_VERSION@
%define libxklavier_version     4.0
%define libxml2_version         2.0

%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:  gtk2-devel
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_pygobject2_devel
BuildRequires:  python2-devel
BuildRequires:  swig
%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_pygobject2_devel
%package pygobject2
Summary:    Input Pad for Python GObject2
Group:      System Environment/Libraries
Requires:   %{name} = %{version}-%{release}
Requires:   pygtk2

%description pygobject2
The input-pad-pygobject2 package contains the python wrapper files.
%endif

%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_pygobject2_devel
    --enable-pygobject2         \
%endif
%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
%if %have_pygobject2_devel
rm -f $RPM_BUILD_ROOT%python_sitearch/%{name}-%sub_version/*.la
rm -f $RPM_BUILD_ROOT%python_sitearch/%{name}-%sub_version/*.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-1.0.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-1.0.gir
%endif

%if %have_pygobject2_devel
%files pygobject2
%defattr(-,root,root,-)
%python_sitearch/%{name}-%sub_version
%python_sitearch/pyinput_pad.pth
%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 <takao.fujiwara1@gmail.com> - @PACKAGE_VERSION@-1
- Current version.