[gpsd] update to 3.0
Miroslav Lichvar
mlichvar at fedoraproject.org
Tue Aug 23 12:09:45 UTC 2011
commit 5cec01412cf49f3649dea763fe1ac02e1c60014a
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date: Mon Aug 22 16:40:57 2011 +0200
update to 3.0
.gitignore | 2 +-
gpsd-2.95-gpscatnoarg.patch | 66 -------------------------------------------
gpsd-2.95-hotplugvars.patch | 32 ---------------------
gpsd-2.95-silentmake.patch | 12 --------
gpsd-scons.patch | 54 +++++++++++++++++++++++++++++++++++
gpsd.spec | 61 ++++++++++++++++++++++-----------------
sources | 2 +-
7 files changed, 90 insertions(+), 139 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d2a361f..d250df1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-gpsd-2.95.tar.gz
+/gpsd-3.0.tar.gz
diff --git a/gpsd-scons.patch b/gpsd-scons.patch
new file mode 100644
index 0000000..30b9215
--- /dev/null
+++ b/gpsd-scons.patch
@@ -0,0 +1,54 @@
+diff -up gpsd-3.0/SConstruct.scons gpsd-3.0/SConstruct
+--- gpsd-3.0/SConstruct.scons 2011-08-19 07:36:28.000000000 +0200
++++ gpsd-3.0/SConstruct 2011-08-22 16:35:20.763702823 +0200
+@@ -155,7 +155,7 @@ for i in ["AR", "ARFLAGS", "CCFLAGS", "C
+ j = i
+ if i == "LD":
+ i = "SHLINK"
+- env[j]=os.getenv(i)
++ env[j]=Split(os.getenv(i))
+ for flags in ["LDFLAGS", "CPPFLAGS"]:
+ if os.environ.has_key(flags):
+ env.MergeFlags([os.getenv(flags)])
+@@ -194,14 +194,12 @@ def installdir(dir):
+
+ # Honor the specified installation prefix in link paths.
+ env.Prepend(LIBPATH=[os.path.join(env['prefix'], installdir('libdir'))])
+-env.Prepend(RPATH=[os.path.join(env['prefix'], installdir('libdir'))])
+
+ # Tell generated binaries to look in the current directory for
+ # shared libraries. Should be handled sanely by scons on all systems.
+ # Not good to use '.' or a relative path here; it's a security risk.
+ # At install time we should use chrpath to edit this out of RPATH.
+ env.Prepend(LIBPATH=[os.path.realpath(os.curdir)])
+-env.Prepend(RPATH=[os.path.realpath(os.curdir)])
+
+ # Give deheader a way to set compiler flags
+ if 'MORECFLAGS' in os.environ:
+@@ -217,8 +215,7 @@ env.SourceCode('.', None)
+
+ # Should we build with debug symbols?
+ if env['debug']:
+- env.Append(CCFLAGS=['-g'])
+- env.Append(CCFLAGS=['-O0'])
++ pass
+ else:
+ env.Append(CCFLAGS=['-O2'])
+
+@@ -383,6 +380,7 @@ if config.CheckExecutable('$CHRPATH -v',
+ have_chrpath = True
+ else:
+ have_chrpath = False
++have_chrpath = False
+
+ # Map options to libraries required to support them that might be absent.
+ optionrequires = {
+@@ -822,7 +820,7 @@ if st != 0:
+ from datetime import datetime
+ rev = datetime.now().isoformat()[:-4]
+ revision='#define REVISION "%s"\n' %(rev.strip(),)
+-env.NoClean(env.Textfile(target="revision.h", source=[revision]))
++#env.NoClean(env.Textfile(target="revision.h", source=[revision]))
+
+ generated_sources = ['packet_names.h', 'timebase.h', 'gpsd.h', "ais_json.i",
+ 'gps_maskdump.c', 'ais_json.c', 'revision.h']
diff --git a/gpsd.spec b/gpsd.spec
index c0c166c..728bcd9 100644
--- a/gpsd.spec
+++ b/gpsd.spec
@@ -1,6 +1,6 @@
Name: gpsd
-Version: 2.95
-Release: 7%{?dist}
+Version: 3.0
+Release: 1%{?dist}
Summary: Service daemon for mediating access to a GPS
Group: System Environment/Daemons
@@ -9,16 +9,15 @@ URL: http://developer.berlios.de/projects/gpsd/
Source0: http://download.berlios.de/gpsd/%{name}-%{version}.tar.gz
Source10: gpsd.service
Source11: gpsd.sysconfig
-Patch0: gpsd-2.95-silentmake.patch
-Patch1: gpsd-2.95-hotplugvars.patch
-Patch2: gpsd-2.95-gpscatnoarg.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# fix RPATH, CFLAGS and revision.h
+Patch0: gpsd-scons.patch
BuildRequires: dbus-devel dbus-glib-devel ncurses-devel xmlto python-devel
+BuildRequires: scons desktop-file-utils bluez-libs-devel
%ifnarch s390 s390x
BuildRequires: libusb1-devel
%endif
-BuildRequires: desktop-file-utils
Requires: %{name}-libs = %{version}-%{release}
Requires: udev
@@ -73,24 +72,32 @@ can run on a serial terminal or terminal emulator.
%prep
%setup -q
-%patch0 -p1 -b .silentmake
-%patch1 -p1 -b .hotplugvars
-%patch2 -p1 -b .gpscatnoarg
+%patch0 -p1 -b .scons
-%build
-%configure \
- --enable-dbus \
- --disable-libQgpsmm \
- --disable-static
-sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+echo '#define REVISION "release-%{version}-%{release}"' > revision.h
-make %{?_smp_mflags}
+%build
+export CFLAGS="%{optflags}"
+# fails with %{_smp_mflags}
+scons \
+ dbus=yes \
+ systemd=yes \
+ libQgpsmm=no \
+ debug=yes \
+ prefix="" \
+ sysconfdif=%{_sysconfdir} \
+ bindir=%{_bindir} \
+ includedir=%{_includedir} \
+ libdir=%{_libdir} \
+ sbindir=%{_sbindir} \
+ mandir=%{_mandir} \
+ docdir=%{_docdir} \
+ build
%install
rm -rf %{buildroot}
-make DESTDIR=%{buildroot} pythondir=%{python_sitearch} install
+DESTDIR=%{buildroot} scons install
# service files
%{__install} -d -m 0755 %{buildroot}/lib/systemd/system
@@ -108,13 +115,7 @@ make DESTDIR=%{buildroot} pythondir=%{python_sitearch} install
# hotplug script
%{__install} -d -m 0755 %{buildroot}/lib/udev
-%{__install} -p -m 0755 gpsd.hotplug gpsd.hotplug.wrapper %{buildroot}/lib/udev
-
-# remove .la files
-rm -f %{buildroot}%{_libdir}/libgps*.la
-
-# fix non-executable python script
-%{__chmod} +x %{buildroot}%{python_sitearch}/gps/gps.py
+%{__install} -p -m 0755 gpsd.hotplug %{buildroot}/lib/udev
# Install the .desktop files
desktop-file-install --vendor fedora \
@@ -130,6 +131,8 @@ desktop-file-install --vendor fedora \
%{__install} -d -m 0755 %{buildroot}%{_datadir}/gpsd
%{__install} -p -m 0644 packaging/X11/gpsd-logo.png %{buildroot}%{_datadir}/gpsd/gpsd-logo.png
+# Not needed since gpsd.h is not installed
+rm %{buildroot}%{_libdir}/{libgpsd.so,pkgconfig/libgpsd.pc}
%clean
rm -rf %{buildroot}
@@ -161,12 +164,14 @@ fi
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/udev/rules.d/*
%{_sbindir}/gpsd
+%{_sbindir}/gpsdctl
%{_bindir}/gpsprof
%{_bindir}/gpsmon
%{_bindir}/gpsctl
/lib/systemd/system/gpsd.service
/lib/udev/gpsd*
%{_mandir}/man8/gpsd.8*
+%{_mandir}/man8/gpsdctl.8*
%{_mandir}/man1/gpsprof.1*
%{_mandir}/man1/gpsmon.1*
%{_mandir}/man1/gpsctl.1*
@@ -186,17 +191,18 @@ fi
%{python_sitearch}/gps/fake*
%{_includedir}/gps.h
%{_includedir}/libgpsmm.h
-%{_includedir}/gpsd.h
%{_mandir}/man1/gpsfake.1*
%{_mandir}/man3/libgps.3*
+%{_mandir}/man3/libQgpsmm.3*
%{_mandir}/man3/libgpsmm.3*
%{_mandir}/man3/libgpsd.3*
-%{_mandir}/man5/rtcm-104.5*
+%{_mandir}/man5/gpsd_json.5*
%{_mandir}/man5/srec.5*
%files clients
%defattr(-,root,root,-)
%{_bindir}/cgps
+%{_bindir}/gegps
%{_bindir}/gpscat
%{_bindir}/gpsdecode
%{_bindir}/gpspipe
@@ -204,6 +210,7 @@ fi
%{_bindir}/lcdgps
%{_bindir}/xgps
%{_bindir}/xgpsspeed
+%{_mandir}/man1/gegps.1*
%{_mandir}/man1/gps.1*
%{_mandir}/man1/gpsdecode.1*
%{_mandir}/man1/gpspipe.1*
diff --git a/sources b/sources
index 727574f..67e348b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-12535a9ed9fecf9ea2c5bdc9840da5ae gpsd-2.95.tar.gz
+c63d41a26868e9bdd48d9e311a9cc42c gpsd-3.0.tar.gz
More information about the scm-commits
mailing list