forked from WiringPi/WiringPi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwiringpi.spec.in
192 lines (160 loc) · 6.42 KB
/
wiringpi.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
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
%if %{defined _project}
# define if building on openSUSE build service
%global build_on_obs 1
%global reconfigure_mode 0
%else
%define _project local
%global build_on_obs 0
%global reconfigure_mode 0
%global _hardened_build 1
%endif
%if %{defined nodebug}
%global debug_package %{nil}
%endif
%global _prefix /usr
%global mandir /usr/share/man
%global _pkg_config_path /usr/%{_lib}/pkgconfig
%if %build_on_obs == 1
%global packager Manvendra Bhangui <@email@>
%endif
%define see_base For a description of wiringpi visit https://github.com/mbhangui/wiringPi
Name: wiringpi
Version: @version@
Release: @release@%{?dist}
Summary: Utility to access/maniplate Raspberry Pi GPIO pins
License: LGPLv3+
URL: https://github.com/mbhangui/wiringPi
Source0: %{name}-%{version}.tar.gz
BuildRequires: gcc gcc-c++ make autoconf automake libtool pkgconfig
BuildRequires: glibc glibc-devel binutils
AutoReqProv: Yes
%description
WiringPi consists of libraries written in C to access Raspberry PI GPIO
pins. It also includes a utility named gpio to access and manipulate the
GPIO pins.
%{see_base}
%package -n libwiringpi-devel
Summary: Development header files and libraries for libwiringpi
%if %{undefined suse_version} && %{undefined sles_version}
Group: System Environment/Libraries
%else
Group: System/Libraries
%endif
%description -n libwiringpi-devel
The wiringpi libraries and headers provide functions to access GPIO pins
on a Raspberry Pi from C and C++ and BASIC programs as well as from the
command-line using gpio command line utility
This package contains the static library libwiringpi.a and headers for
libwiringpi necessary to develop WiringPi applications.
%{see_base}
%package -n libwiringpi
Summary: Library for accessing GPIO on Raspberry Pi
Group: Development/Libraries/Other
%description -n libwiringpi
The wiringpi libraries and headers provide functions to access GPIO pins
on a Raspberry Pi from C and C++ and BASIC programs as well as from the
command-line using gpio command line utility
This package contains the shared libraries (*.so*) which certain languages
and applications need to dynamically load and use libwiringpi.
%{see_base}
%package -n libwiringpidev-devel
Summary: Development header files and libraries for libwiringpidev
%if %{undefined suse_version} && %{undefined sles_version}
Group: System Environment/Libraries
%else
Group: System/Libraries
%endif
%description -n libwiringpidev-devel
The devLib is a set of library routines implemented using wiringpi to give
you easy access to some popular peripherals. Devices supported include
character LCD displays (based on the Hitachi HD44780U chips), and graphical
ones – e.g. the common 128×64 pixel displays with the generic 12864H driver
chip. The DS1302 RTC clock chip, sensors based on the Maxdetect chips (e.g.
RHT003) the Gertboard and PiFace interface boards and so on.
This package contains the static library libwiringpidev.a and headers for
libwiringpidev necessary to develop WiringPi applications.
%package -n libwiringpidev
Summary: Library for accessing Peripherals on Raspberry Pi
Group: Development/Libraries/Other
%description -n libwiringpidev
The devLib is a set of library routines implemented using wiringpi to give
you easy access to some popular peripherals. Devices supported include
character LCD displays (based on the Hitachi HD44780U chips), and graphical
ones – e.g. the common 128×64 pixel displays with the generic 12864H driver
chip. The DS1302 RTC clock chip, sensors based on the Maxdetect chips (e.g.
RHT003) the Gertboard and PiFace interface boards and so on.
This package contains the shared libraries (*.so*) which certain languages
and applications need to dynamically load and use libwiringpidev.
%{see_base}
%prep
%setup -qn wiringpi-%{version}
%build
%configure --prefix=/usr --libdir=%{_libdir} --with-pkgconfigdir=%{_pkg_config_path}
%{__make} %{?_smp_mflags}
%install
%if %{defined nodebug}
%{__make} -s %{?_smp_mflags} DESTDIR=%{buildroot} install-strip
%else
%{__make} -s %{?_smp_mflags} DESTDIR=%{buildroot} install
%endif
for i in %{name} libwiringpi libwiringpi-devel libwiringpidev libwiringpidev-devel
do
%{__mkdir_p} %{buildroot}%{_prefix}/share/doc/$i
install -p -m 0644 COPYING.LESSER %{buildroot}%{_prefix}/share/doc/$i
done
%{__rm} -f %{buildroot}%{_libdir}/libwiringPi.la
%{__rm} -f %{buildroot}%{_libdir}/libwiringPiDev.la
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%if %build_on_obs == 0
%license %attr(0644,root,root) %{_prefix}/share/doc/%{name}/COPYING.LESSER
%else
%attr(0644,root,root) %{_prefix}/share/doc/%{name}/COPYING.LESSER
%endif
%defattr(-,root,root,-)
%attr(4755,root,root) %{_prefix}/bin/gpio
%docdir %{_prefix}/share/doc/%{name}
%doc /usr/share/man/man1/*
%doc pins/pins.pdf
%files -n libwiringpi-devel
%dir %attr(755,root,root) %{_prefix}/include/wiringPi
%attr(0644,root,root) %{_prefix}/include/wiringPi/*
%{_libdir}/libwiringPi.so
%{_libdir}/libwiringPi.a
%{_pkg_config_path}/libwiringPi.pc
%if %build_on_obs == 0
%license %attr(0644,root,root) %{_prefix}/share/doc/libwiringpi-devel/COPYING.LESSER
%else
%attr(0644,root,root) %{_prefix}/share/doc/libwiringpi-devel/COPYING.LESSER
%endif
%docdir %{_prefix}/share/doc/libwiringpi-devel
%files -n libwiringpi
%{_libdir}/libwiringPi.so.*
%if %build_on_obs == 0
%license %attr(0644,root,root) %{_prefix}/share/doc/libwiringpi/COPYING.LESSER
%else
%attr(0644,root,root) %{_prefix}/share/doc/libwiringpi/COPYING.LESSER
%endif
%docdir %{_prefix}/share/doc/libwiringpi
%files -n libwiringpidev-devel
%dir %attr(755,root,root) %{_prefix}/include/wiringPiDev
%attr(0644,root,root) %{_prefix}/include/wiringPiDev/*
%{_libdir}/libwiringPiDev.so
%{_libdir}/libwiringPiDev.a
%if %build_on_obs == 0
%license %attr(0644,root,root) %{_prefix}/share/doc/libwiringpidev-devel/COPYING.LESSER
%else
%attr(0644,root,root) %{_prefix}/share/doc/libwiringpidev-devel/COPYING.LESSER
%endif
%{_pkg_config_path}/libwiringPiDev.pc
%docdir %{_prefix}/share/doc/libwiringpidev-devel
%files -n libwiringpidev
%if %build_on_obs == 0
%license %attr(0644,root,root) %{_prefix}/share/doc/libwiringpidev/COPYING.LESSER
%else
%attr(0644,root,root) %{_prefix}/share/doc/libwiringpidev/COPYING.LESSER
%endif
%{_libdir}/libwiringPiDev.so.*
%docdir %{_prefix}/share/doc/libwiringpidev
%changelog