From 71cd39cac8e51c1b9ec36e009d2220c2a231ba3c7537982bf7faca90d3c94c7b Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 8 Mar 2017 18:30:08 +0000 Subject: [PATCH] - Packaging cleanup: * Run spec-cleaner * Add _service OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/libmirisdr?expand=0&rev=2 --- _service | 14 +++ _servicedata | 4 + ibmirisdr.changes | 7 ++ libmirisdr-0.0.0+git.20130608.tar.xz | 3 + libmirisdr-0.0.20130608.tar.gz | 3 - libmirisdr.spec | 173 ++++----------------------- 6 files changed, 48 insertions(+), 156 deletions(-) create mode 100644 _service create mode 100644 _servicedata create mode 100644 libmirisdr-0.0.0+git.20130608.tar.xz delete mode 100644 libmirisdr-0.0.20130608.tar.gz diff --git a/_service b/_service new file mode 100644 index 0000000..d1dbd25 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + https://git.osmocom.org/libmirisdr + git + enable + libmirisdr + 0.0.0+git.%cd + + + *.tar + xz + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..b39c773 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://git.osmocom.org/libmirisdr + 59ba3721b1cb7c746503d8de9c918f54fe7e8399 \ No newline at end of file diff --git a/ibmirisdr.changes b/ibmirisdr.changes index 26ea887..090f3c9 100644 --- a/ibmirisdr.changes +++ b/ibmirisdr.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 8 18:26:06 UTC 2017 - mpluskal@suse.com + +- Packaging cleanup: + * Run spec-cleaner + * Add _service + ------------------------------------------------------------------- Fri Feb 19 12:06:52 UTC 2016 - dl8fcl@t-online.de diff --git a/libmirisdr-0.0.0+git.20130608.tar.xz b/libmirisdr-0.0.0+git.20130608.tar.xz new file mode 100644 index 0000000..b113e6c --- /dev/null +++ b/libmirisdr-0.0.0+git.20130608.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a9f7e88167c54371ed793f233462a18e7ddf8da025d35afc6309faffc625237 +size 40244 diff --git a/libmirisdr-0.0.20130608.tar.gz b/libmirisdr-0.0.20130608.tar.gz deleted file mode 100644 index 2e28618..0000000 --- a/libmirisdr-0.0.20130608.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8b5563a9f5d87f1b72391ed966eee677bf34e034b17139a27455cd6c6f67c43e -size 47417 diff --git a/libmirisdr.spec b/libmirisdr.spec index ecf8370..07615b1 100644 --- a/libmirisdr.spec +++ b/libmirisdr.spec @@ -1,6 +1,7 @@ # # spec file for package libmirisdr # +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2012-2014 Wojciech Kazubski, wk@ire.pw.edu.pl # # All modifications and additions to the file contributed by third parties @@ -11,71 +12,36 @@ # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - -%if 0%{?suse_version} != 1315 && 0%{?suse_version} != 1110 -%define build_docs 1 -%else -%define build_docs 0 -%endif Name: libmirisdr -Version: 0.0.20130608 -Release: 9.1 +Version: 0.0.0+git.20130608 +Release: 0 Summary: Support programs for MRi2500 License: GPL-2.0 -%if 0%{?suse_version} Group: Productivity/Hamradio/Other -%endif -%if 0%{?fedora} -Group: Applications/Engineering -%endif -Source: %{name}-%{version}.tar.gz -URL: http://cgit.osmocom.org/libmirisdr/ -BuildRoot: %{_tmppath}/build-%{name}-%{version} -BuildRequires: cmake pkg-config udev -%if 0%{?suse_version} -BuildRequires: libusb-1_0-devel -%endif -%if 0%{?fedora} -BuildRequires: libusb1-devel -%endif -%if 0%{?suse_version} >= 1100 -BuildRequires: fdupes -%endif -%if %{build_docs} -BuildRequires: doxygen texlive-latex graphviz -%if 0%{?fedora} > 17 || 0%{?suse_version} > 1220 -BuildRequires: texlive texlive-sectsty texlive-tocloft texlive-xtab texlive-multirow -BuildRequires: texlive-helvetic texlive-times -BuildRequires: texlive-latex-bin-bin texlive-texconfig texlive-metafont-bin -BuildRequires: texlive-natbib texlive-float texlive-colortbl texlive-psnfss texlive-fancyhdr -BuildRequires: texlive-makeindex-bin texlive-dvips -BuildRequires: texlive-wasysym texlive-wasy -BuildRequires: texlive-adjustbox -BuildRequires: texlive-tabu texlive-caption -%endif -%endif +Url: http://cgit.osmocom.org/libmirisdr/ +Source: %{name}-%{version}.tar.xz +BuildRequires: cmake +BuildRequires: pkgconfig +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(udev) %description Programs that controls Mirics MRi2500 based DVB dongle in raw mode, so it can be used as a SDR receiver. - -%if 0%{?suse_version} %package -n libmirisdr0 Summary: SDR driver for MRi2500 Group: Hardware/Other -Provides: %{name} = %{version}-%{release} +Provides: %{name} = %{version} %description -n libmirisdr0 Library to run Mirics MRi2500 based DVB dongle as a SDR receiver. - %package -n mirisdr Summary: Support programs for MRi2500 Group: Productivity/Hamradio/Other @@ -83,8 +49,6 @@ Group: Productivity/Hamradio/Other %description -n mirisdr Programs that controls Mirics MRi2500 based DVB dongle in raw mode, so it can be used as a SDR receiver. -%endif - %package devel Summary: Development files for libmirisdr @@ -95,124 +59,36 @@ AutoReq: on %description devel Library headers and other development files for mirisdr driver. - -%package devel-doc -Summary: Documentation for libmirisdr -Group: Development/Libraries/Other -Requires: %{name}-devel = %{version}-%{release} -AutoReq: on -%if 0%{?suse_version} >= 1200 -BuildArch: noarch -%endif - -%description devel-doc -Documentation for libmirisdr driver. HTML and PDF formats. - - %prep -%setup -q -n %{name} - -# remove buildtime from documentation -sed -i 's|^HTML_TIMESTAMP = YES|HTML_TIMESTAMP = NO|' Doxyfile.in - +%setup -q %build -mkdir build -cd build -cmake .. \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -%ifarch x86_64 - -DLIB_SUFFIX=64 \ -%endif - +%cmake make %{?_smp_mflags} -cd .. - -#create documentation -%if %{build_docs} -cp Doxyfile.in Doxyfile -sed -i "s\@VERSION@\%{version}\1" Doxyfile -doxygen -cd doc/latex -make pdf -%endif - %install -rm -rf %{buildroot} -cd build -make DESTDIR=%{buildroot} install +%cmake_install rm %{buildroot}%{_libdir}/libmirisdr.a -%ifarch x86_64 -mv %{buildroot}/usr/lib/pkgconfig %{buildroot}%{_libdir} +%ifarch x86_64 aarch64 +mv %{buildroot}%{_prefix}/lib/pkgconfig %{buildroot}%{_libdir} %endif #install udev rules -%if 0%{?suse_version} >= 1310 || 0%{?fedora} >= 19 -mkdir -p %{buildroot}%{_udevrulesdir} -cp ../mirisdr.rules %{buildroot}%{_udevrulesdir}/10-mirisdr.rules -%else -mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d -cp ../mirisdr.rules %{buildroot}%{_sysconfdir}/udev/rules.d/10-mirisdr.rules -%endif -cd .. +install -D -p -m 0644 mirisdr.rules %{buildroot}%{_udevrulesdir}/10-mirisdr.rules -#install documentation -%if %{build_docs} -mkdir -p %{buildroot}%{_docdir}/%{name}/pdf -cp -r doc/html %{buildroot}%{_docdir}/%{name} -cp -r doc/latex/*.pdf %{buildroot}%{_docdir}/%{name}/pdf -%if 0%{?suse_version} >= 1100 -%fdupes %{buildroot}%{_docdir}/%{name} -%endif -%endif +%post -n libmirisdr0 -p /sbin/ldconfig +%postun -n libmirisdr0 -p/sbin/ldconfig - -%clean -rm -rf %{buildroot} - - -%if 0%{?suse_version} -%post -n libmirisdr0 -/sbin/ldconfig -%udev_rules_update -%postun -n libmirisdr0 -/sbin/ldconfig -%udev_rules_update -%else -%post -n libmirisdr -p /sbin/ldconfig -%postun -n libmirisdr -p /sbin/ldconfig -%endif - -%if 0%{?suse_version} %files -n mirisdr %defattr(-,root,root) %doc AUTHORS COPYING README -%{_bindir}/miri_* -%if %{build_docs} -%exclude %{_docdir}/%{name}/html -%exclude %{_docdir}/%{name}/pdf -%endif +%{_bindir}/miri_sdr %files -n libmirisdr0 %defattr(-,root,root) -%else -%files -%defattr(-,root,root) %doc AUTHORS COPYING README -%if %{build_docs} -%exclude %{_docdir}/%{name}/html -%exclude %{_docdir}/%{name}/pdf -%endif -%{_bindir}/miri_* - -%endif %{_libdir}/libmirisdr.so.* -%if 0%{?suse_version} >= 1310 || 0%{?fedora} >= 19 %{_udevrulesdir}/10-mirisdr.rules -%else -%config(noreplace) %{_sysconfdir}/udev/rules.d/10-mirisdr.rules -%endif %files devel %defattr(-,root,root) @@ -220,13 +96,4 @@ rm -rf %{buildroot} %{_includedir}/*.h %{_libdir}/pkgconfig/libmirisdr.pc -%if %{build_docs} -%files devel-doc -%defattr(-,root,root) -%dir %{_docdir}/%{name} -%{_docdir}/%{name}/html -%{_docdir}/%{name}/pdf -%endif - - %changelog