Update to 3.17.
- Create a python3 subpackage now that upstream fully supports it. - Add in build of the Qt bindings as a subpackage.
This commit is contained in:
parent
c6049a5270
commit
6d871d76ce
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@
|
|||||||
/gpsd-3.14.tar.gz
|
/gpsd-3.14.tar.gz
|
||||||
/gpsd-3.15.tar.gz
|
/gpsd-3.15.tar.gz
|
||||||
/gpsd-3.16.tar.gz
|
/gpsd-3.16.tar.gz
|
||||||
|
/gpsd-3.17.tar.gz
|
||||||
|
155
gpsd.spec
155
gpsd.spec
@ -1,9 +1,11 @@
|
|||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
%global srcname gpsd
|
%global srcname gpsd
|
||||||
|
|
||||||
|
%global with_qt 1
|
||||||
|
|
||||||
Name: %{srcname}
|
Name: %{srcname}
|
||||||
Version: 3.16
|
Version: 3.17
|
||||||
Release: 7%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Service daemon for mediating access to a GPS
|
Summary: Service daemon for mediating access to a GPS
|
||||||
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -12,8 +14,11 @@ URL: http://catb.org/gpsd/
|
|||||||
Source0: http://download.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz
|
Source0: http://download.savannah.gnu.org/releases/gpsd/%{name}-%{version}.tar.gz
|
||||||
Source11: gpsd.sysconfig
|
Source11: gpsd.sysconfig
|
||||||
|
|
||||||
BuildRequires: dbus-devel dbus-glib-devel ncurses-devel xmlto python2-devel
|
BuildRequires: dbus-devel dbus-glib-devel ncurses-devel xmlto python2-devel python3-devel
|
||||||
BuildRequires: scons desktop-file-utils bluez-libs-devel pps-tools-devel
|
BuildRequires: scons desktop-file-utils bluez-libs-devel pps-tools-devel /usr/bin/c++
|
||||||
|
%if %{with_qt}
|
||||||
|
BuildRequires: qt-devel
|
||||||
|
%endif
|
||||||
%ifnarch s390 s390x
|
%ifnarch s390 s390x
|
||||||
BuildRequires: libusb1-devel
|
BuildRequires: libusb1-devel
|
||||||
%endif
|
%endif
|
||||||
@ -46,26 +51,56 @@ to a GPS for applications.
|
|||||||
Summary: Python libraries and modules for use with gpsd
|
Summary: Python libraries and modules for use with gpsd
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
%{?python_provide:%python_provide python-%{srcname}}
|
%{?python_provide:%python_provide python2-%{srcname}}
|
||||||
|
|
||||||
%description -n python2-%{srcname}
|
%description -n python2-%{srcname}
|
||||||
This package contains the python modules that manage access to a GPS for
|
This package contains the python2 modules that manage access to a GPS for
|
||||||
|
applications, and commonly useful python applications for use with gpsd.
|
||||||
|
|
||||||
|
%package -n python3-%{srcname}
|
||||||
|
Summary: Python libraries and modules for use with gpsd
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||||||
|
|
||||||
|
%description -n python3-%{srcname}
|
||||||
|
This package contains the python3 modules that manage access to a GPS for
|
||||||
applications, and commonly useful python applications for use with gpsd.
|
applications, and commonly useful python applications for use with gpsd.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for the gpsd library
|
Summary: Development files for the gpsd library
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: pkgconfig
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package provides C header files for the gpsd shared libraries that
|
This package provides C header files for the gpsd shared libraries that
|
||||||
manage access to a GPS for applications
|
manage access to a GPS for applications
|
||||||
|
|
||||||
|
%if %{with_qt}
|
||||||
|
%package qt
|
||||||
|
Summary: C++/Qt5 bindings for the gpsd library
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description qt
|
||||||
|
This package provide C++ and Qt bindings for use with the libgps library from
|
||||||
|
gpsd.
|
||||||
|
|
||||||
|
%package qt-devel
|
||||||
|
Summary: Development files for the C++/Qt5 bindings for the gpsd library
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: %{name}-qt%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description qt-devel
|
||||||
|
This package provides the development files for the C++ and Qt bindings for use
|
||||||
|
with the libgps library from gpsd.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package clients
|
%package clients
|
||||||
Summary: Clients for gpsd
|
Summary: Clients for gpsd
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Requires: python2-%{srcname} = %{version}-%{release}
|
Requires: python3-%{srcname} = %{version}-%{release}
|
||||||
Requires: %{srcname}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{srcname}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
%description clients
|
%description clients
|
||||||
@ -86,29 +121,48 @@ different gps devices.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
rm -fr %{srcname}-%{version}
|
||||||
|
mkdir -p %{srcname}-%{version}/python2
|
||||||
|
mkdir -p %{srcname}-%{version}/python3
|
||||||
|
|
||||||
|
tar -xf %{SOURCE0} -C %{srcname}-%{version}/python2
|
||||||
|
tar -xf %{SOURCE0} -C %{srcname}-%{version}/python3
|
||||||
|
|
||||||
|
cd %{srcname}-%{version}
|
||||||
|
|
||||||
# set gpsd revision string to include package revision
|
# set gpsd revision string to include package revision
|
||||||
sed -i 's|^revision=.*REVISION.*$|revision='\'\
|
sed -i 's|^revision=.*REVISION.*$|revision='\'\
|
||||||
'#define REVISION "%{version}-%{release}'\"\'\| SConstruct
|
'#define REVISION "%{version}-%{release}'\"\'\| python*/%{srcname}-%{version}/SConstruct
|
||||||
|
|
||||||
# fix systemd path
|
# fix systemd path
|
||||||
sed -i 's|systemd_dir =.*|systemd_dir = '\'%{_unitdir}\''|' SConstruct
|
sed -i 's|systemd_dir =.*|systemd_dir = '\'%{_unitdir}\''|' python*/%{srcname}-%{version}/SConstruct
|
||||||
|
|
||||||
# don't try reloading systemd when installing in the build root
|
# don't try reloading systemd when installing in the build root
|
||||||
sed -i 's|systemctl daemon-reload|true|' SConstruct
|
sed -i 's|systemctl daemon-reload|true|' python*/%{srcname}-%{version}/SConstruct
|
||||||
|
|
||||||
# don't set RPATH
|
# don't set RPATH
|
||||||
sed -i 's|env.Prepend.*RPATH.*|pass #\0|' SConstruct
|
sed -i 's|env.Prepend.*RPATH.*|pass #\0|' python*/%{srcname}-%{version}/SConstruct
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CCFLAGS="%{optflags}"
|
export CCFLAGS="%{optflags}"
|
||||||
export LINKFLAGS="%{__global_ldflags}"
|
export LINKFLAGS="%{__global_ldflags}"
|
||||||
|
|
||||||
|
pyversions=( python2 python3 )
|
||||||
|
pylibdir=( %{python2_sitearch} %{python3_sitearch} )
|
||||||
|
|
||||||
|
for i in 0 1
|
||||||
|
do
|
||||||
|
pushd %{srcname}-%{version}/${pyversions[i]}/%{srcname}-%{version}
|
||||||
|
|
||||||
# breaks with %{_smp_mflags}
|
# breaks with %{_smp_mflags}
|
||||||
scons \
|
scons \
|
||||||
dbus_export=yes \
|
dbus_export=yes \
|
||||||
systemd=yes \
|
systemd=yes \
|
||||||
|
%if %{with_qt}
|
||||||
|
libQgpsmm=yes \
|
||||||
|
%else
|
||||||
libQgpsmm=no \
|
libQgpsmm=no \
|
||||||
|
%endif
|
||||||
debug=yes \
|
debug=yes \
|
||||||
leapfetch=no \
|
leapfetch=no \
|
||||||
prefix="" \
|
prefix="" \
|
||||||
@ -121,16 +175,33 @@ scons \
|
|||||||
docdir=%{_docdir} \
|
docdir=%{_docdir} \
|
||||||
pkgconfigdir=%{_libdir}/pkgconfig \
|
pkgconfigdir=%{_libdir}/pkgconfig \
|
||||||
udevdir=$(dirname %{_udevrulesdir}) \
|
udevdir=$(dirname %{_udevrulesdir}) \
|
||||||
|
target_python=${pyversions[i]} \
|
||||||
|
python_libdir=${pylibdir[i]} \
|
||||||
build
|
build
|
||||||
|
|
||||||
# Fix python interpreter path.
|
# Fix python interpreter path.
|
||||||
sed -e 's,#!/usr/bin/env \+python2\?,#!/usr/bin/python2,g' -i \
|
sed -e "s,#!/usr/bin/\(python[23]\?\|env \+python[23]\?\),#!/usr/bin/${pyversions[i]},g" -i \
|
||||||
gegps gpscat gpsfake xgps xgpsspeed gpsprof gps/*.py
|
gegps gpscat gpsfake xgps xgpsspeed gpsprof gps/*.py
|
||||||
|
|
||||||
|
popd
|
||||||
|
done
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# avoid rebuilding
|
# avoid rebuilding
|
||||||
export CCFLAGS="%{optflags}"
|
export CCFLAGS="%{optflags}"
|
||||||
export LINKFLAGS="%{__global_ldflags}"
|
export LINKFLAGS="%{__global_ldflags}"
|
||||||
|
|
||||||
|
# Install python2 first
|
||||||
|
pushd %{srcname}-%{version}/python2/%{srcname}-%{version}
|
||||||
|
|
||||||
|
DESTDIR=%{buildroot} scons install systemd_install udev-install
|
||||||
|
|
||||||
|
# Now delete all the installed files except the python2 files
|
||||||
|
find %{buildroot} \( -not -type d -a -not -path "*/python2.*/*" \) -delete
|
||||||
|
|
||||||
|
popd
|
||||||
|
pushd %{srcname}-%{version}/python3/%{srcname}-%{version}
|
||||||
|
|
||||||
DESTDIR=%{buildroot} scons install systemd_install udev-install
|
DESTDIR=%{buildroot} scons install systemd_install udev-install
|
||||||
|
|
||||||
# use the old name for udev rules
|
# use the old name for udev rules
|
||||||
@ -155,8 +226,13 @@ desktop-file-install \
|
|||||||
# Missed in scons install
|
# Missed in scons install
|
||||||
%{__install} -p -m 0755 gpsinit %{buildroot}%{_sbindir}
|
%{__install} -p -m 0755 gpsinit %{buildroot}%{_sbindir}
|
||||||
|
|
||||||
# Not needed since gpsd.h is not installed
|
# If qt build was disabled, clean up the files that may have been installed
|
||||||
rm %{buildroot}%{_libdir}/pkgconfig/libgpsd.pc
|
# anyway
|
||||||
|
%if !%{with_qt}
|
||||||
|
%{__rm} -f %{buildroot}%{_libdir}/libQgpsmm* \
|
||||||
|
%{buildroot}%{_libdir}/pkgconfig/Qgpsmm* \
|
||||||
|
%{buildroot}%{_mandir}/man3/libQgpsmm.3*
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post gpsd.service gpsd.socket
|
%systemd_post gpsd.service gpsd.socket
|
||||||
@ -172,8 +248,14 @@ rm %{buildroot}%{_libdir}/pkgconfig/libgpsd.pc
|
|||||||
|
|
||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%if %{with_qt}
|
||||||
|
%post qt -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun qt -p /sbin/ldconfig
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README COPYING
|
%doc %{name}-%{version}/python3/%{name}-%{version}/README %{name}-%{version}/python3/%{name}-%{version}/COPYING
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
||||||
%{_sbindir}/gpsd
|
%{_sbindir}/gpsd
|
||||||
%{_sbindir}/gpsdctl
|
%{_sbindir}/gpsdctl
|
||||||
@ -181,6 +263,7 @@ rm %{buildroot}%{_libdir}/pkgconfig/libgpsd.pc
|
|||||||
%{_bindir}/gpsmon
|
%{_bindir}/gpsmon
|
||||||
%{_bindir}/gpsctl
|
%{_bindir}/gpsctl
|
||||||
%{_bindir}/ntpshmmon
|
%{_bindir}/ntpshmmon
|
||||||
|
%{_bindir}/ppscheck
|
||||||
%{_unitdir}/gpsd.service
|
%{_unitdir}/gpsd.service
|
||||||
%{_unitdir}/gpsd.socket
|
%{_unitdir}/gpsd.socket
|
||||||
%{_unitdir}/gpsdctl@.service
|
%{_unitdir}/gpsdctl@.service
|
||||||
@ -188,31 +271,47 @@ rm %{buildroot}%{_libdir}/pkgconfig/libgpsd.pc
|
|||||||
%{_mandir}/man8/gpsd.8*
|
%{_mandir}/man8/gpsd.8*
|
||||||
%{_mandir}/man8/gpsdctl.8*
|
%{_mandir}/man8/gpsdctl.8*
|
||||||
%{_mandir}/man8/gpsinit.8*
|
%{_mandir}/man8/gpsinit.8*
|
||||||
|
%{_mandir}/man8/ppscheck.8*
|
||||||
%{_mandir}/man1/gpsmon.1*
|
%{_mandir}/man1/gpsmon.1*
|
||||||
%{_mandir}/man1/gpsctl.1*
|
%{_mandir}/man1/gpsctl.1*
|
||||||
%{_mandir}/man1/ntpshmmon.1*
|
%{_mandir}/man1/ntpshmmon.1*
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%{_libdir}/libgps.so.22*
|
%{_libdir}/libgps.so.23*
|
||||||
|
|
||||||
%files -n python2-%{srcname}
|
%files -n python2-%{srcname}
|
||||||
%{_bindir}/gpsprof
|
%{python2_sitearch}/gps*
|
||||||
%{_mandir}/man1/gpsprof.1*
|
|
||||||
%{python_sitearch}/gps*
|
|
||||||
%exclude %{python_sitearch}/gps/fake*
|
%exclude %{python_sitearch}/gps/fake*
|
||||||
|
|
||||||
|
%files -n python3-%{srcname}
|
||||||
|
%{_bindir}/gpsprof
|
||||||
|
%{_mandir}/man1/gpsprof.1*
|
||||||
|
%{python3_sitearch}/gps*
|
||||||
|
%exclude %{python3_sitearch}/gps/fake*
|
||||||
|
%exclude %{python3_sitearch}/gps/__pycache__/fake*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc TODO
|
%doc %{name}-%{version}/python3/%{name}-%{version}/TODO
|
||||||
%{_libdir}/libgps.so
|
%{_libdir}/libgps.so
|
||||||
%{_libdir}/pkgconfig/libgps.pc
|
%{_libdir}/pkgconfig/libgps.pc
|
||||||
%{_includedir}/gps.h
|
%{_includedir}/gps.h
|
||||||
%{_includedir}/libgpsmm.h
|
%{_includedir}/libgpsmm.h
|
||||||
%{_mandir}/man3/libgps.3*
|
%{_mandir}/man3/libgps.3*
|
||||||
%{_mandir}/man3/libQgpsmm.3*
|
|
||||||
%{_mandir}/man3/libgpsmm.3*
|
%{_mandir}/man3/libgpsmm.3*
|
||||||
%{_mandir}/man5/gpsd_json.5*
|
%{_mandir}/man5/gpsd_json.5*
|
||||||
%{_mandir}/man5/srec.5*
|
%{_mandir}/man5/srec.5*
|
||||||
|
|
||||||
|
%if %{with_qt}
|
||||||
|
%files qt
|
||||||
|
%{_libdir}/libQgpsmm.so.23*
|
||||||
|
|
||||||
|
%files qt-devel
|
||||||
|
%{_libdir}/libQgpsmm.so
|
||||||
|
%{_libdir}/libQgpsmm.prl
|
||||||
|
%{_libdir}/pkgconfig/Qgpsmm.pc
|
||||||
|
%{_mandir}/man3/libQgpsmm.3*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files clients
|
%files clients
|
||||||
%{_bindir}/cgps
|
%{_bindir}/cgps
|
||||||
%{_bindir}/gegps
|
%{_bindir}/gegps
|
||||||
@ -230,6 +329,7 @@ rm %{buildroot}%{_libdir}/pkgconfig/libgpsd.pc
|
|||||||
%{_mandir}/man1/gps2udp.1*
|
%{_mandir}/man1/gps2udp.1*
|
||||||
%{_mandir}/man1/gpsdecode.1*
|
%{_mandir}/man1/gpsdecode.1*
|
||||||
%{_mandir}/man1/gpspipe.1*
|
%{_mandir}/man1/gpspipe.1*
|
||||||
|
%{_mandir}/man1/gpxlogger.1*
|
||||||
%{_mandir}/man1/lcdgps.1*
|
%{_mandir}/man1/lcdgps.1*
|
||||||
%{_mandir}/man1/xgps.1*
|
%{_mandir}/man1/xgps.1*
|
||||||
%{_mandir}/man1/xgpsspeed.1*
|
%{_mandir}/man1/xgpsspeed.1*
|
||||||
@ -239,12 +339,15 @@ rm %{buildroot}%{_libdir}/pkgconfig/libgpsd.pc
|
|||||||
%{_datadir}/applications/*.desktop
|
%{_datadir}/applications/*.desktop
|
||||||
%dir %{_datadir}/gpsd
|
%dir %{_datadir}/gpsd
|
||||||
%{_datadir}/gpsd/gpsd-logo.png
|
%{_datadir}/gpsd/gpsd-logo.png
|
||||||
%{python_sitearch}/gps/fake*
|
%{python3_sitearch}/gps/fake*
|
||||||
|
%{python3_sitearch}/gps/__pycache__/fake*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Sep 03 2017 Troy Curtis, Jr <troycurtisjr@gmail.com> - 3.16-7
|
* Fri Sep 08 2017 Troy Curtis, Jr <troycurtisjr@gmail.com> - 3.17-1
|
||||||
- Split python files into python2 package.
|
- Update to 3.17
|
||||||
|
- Build both python2 and python3 files and install into separate subpackages
|
||||||
|
- Add Qt5 subpackage
|
||||||
|
|
||||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.16-6
|
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.16-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user