From 4c17389c6199d8bbf692471f9e6d8b7d76a676147b1d9c2ac9af824ab30f444d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 29 Nov 2015 17:41:48 +0000 Subject: [PATCH] Accepting request 346749 from home:a_faerber:branches:hardware Update via _service and fix udev rules handling OBS-URL: https://build.opensuse.org/request/show/346749 OBS-URL: https://build.opensuse.org/package/show/hardware/libjaylink?expand=0&rev=2 --- _service | 14 +++ ...aylink-0.1.0~git.1448393144.7e0508d.tar.xz | 3 + _service:set_version:libjaylink.spec | 103 ++++++++++++++++++ ...aylink-0.1.0~git.1448393144.7e0508d.tar.xz | 3 + libjaylink.changes | 10 ++ libjaylink.spec | 29 +++-- libjaylink.tar.xz | 3 - 7 files changed, 151 insertions(+), 14 deletions(-) create mode 100644 _service create mode 100644 _service:recompress:tar_scm:libjaylink-0.1.0~git.1448393144.7e0508d.tar.xz create mode 100644 _service:set_version:libjaylink.spec create mode 100644 libjaylink-0.1.0~git.1448393144.7e0508d.tar.xz delete mode 100644 libjaylink.tar.xz diff --git a/_service b/_service new file mode 100644 index 0000000..06c7d91 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + git + git://repo.or.cz/libjaylink.git + libjaylink + 0.1.0~git + master + + + *libjaylink-*.tar + xz + + + diff --git a/_service:recompress:tar_scm:libjaylink-0.1.0~git.1448393144.7e0508d.tar.xz b/_service:recompress:tar_scm:libjaylink-0.1.0~git.1448393144.7e0508d.tar.xz new file mode 100644 index 0000000..aea973d --- /dev/null +++ b/_service:recompress:tar_scm:libjaylink-0.1.0~git.1448393144.7e0508d.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b657ae2cb2bda53cc77dc9cb93450334f1d2ab1a6251c138fe16c68d0b9598f +size 48464 diff --git a/_service:set_version:libjaylink.spec b/_service:set_version:libjaylink.spec new file mode 100644 index 0000000..4b1437b --- /dev/null +++ b/_service:set_version:libjaylink.spec @@ -0,0 +1,103 @@ +# +# spec file for package libjaylink +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# 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/ +# + + +Name: libjaylink +Version: 0.1.0~git.1448393144.7e0508d +Release: 0 +Url: http://git.zapb.de/libjaylink.git +Summary: USB interface library for J-Link +License: GPL-2.0+ +Group: Development/Tools/Debuggers +Source: libjaylink-%{version}.tar.xz +BuildRequires: autoconf >= 2.69 +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkg-config +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(udev) +BuildRequires: xz +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Requires(post): udev +Requires(postun): udev +%define _udevdir %(pkg-config --variable udevdir udev) +Provides: libjaylink0:%{_udevdir}/rules.d/99-libjaylink.rules + +%description +Library for accessing Segger J-Link USB devices. + +%package -n libjaylink0 +Summary: USB interface library for J-Link +Recommends: libjaylink + +%description -n libjaylink0 +Library for accessing Segger J-Link USB devices. + +%package devel +Summary: USB interface library for J-Link -- development files +Requires: libjaylink0 = %{version} + +%description devel +Library for accessing Segger J-Link USB devices. + +This sub-package contains development files. + +%prep +%setup -q + +%build +./autogen.sh +./configure \ + --prefix=%{_prefix} \ + --includedir=%{_includedir} \ + --libdir=%{_libdir} \ + --disable-static \ + CFLAGS="${RPM_OPT_FLAGS}" +make %{?_smp_mflags} + +%install +make %{?_smp_mflags} install DESTDIR=%{buildroot} +rm -f %{buildroot}%{_libdir}/libjaylink.la +mkdir -p %{buildroot}%{_udevdir}/rules.d +cat contrib/99-libjaylink.rules | sed -e 's/GROUP="plugdev"/GROUP="users"/' > %{buildroot}%{_udevdir}/rules.d/99-libjaylink.rules + +%post +%udev_rules_update + +%postun +%udev_rules_update + +%post -n libjaylink0 -p /sbin/ldconfig + +%postun -n libjaylink0 -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc COPYING +%{_udevdir}/rules.d/99-libjaylink.rules + +%files -n libjaylink0 +%defattr(-,root,root,-) +%{_libdir}/libjaylink.so.0* + +%files devel +%defattr(-,root,root,-) +%{_includedir}/libjaylink/ +%{_libdir}/libjaylink.so +%{_libdir}/pkgconfig/libjaylink.pc + +%changelog diff --git a/libjaylink-0.1.0~git.1448393144.7e0508d.tar.xz b/libjaylink-0.1.0~git.1448393144.7e0508d.tar.xz new file mode 100644 index 0000000..766cb2d --- /dev/null +++ b/libjaylink-0.1.0~git.1448393144.7e0508d.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd24663f012710e4068c3d848a1fc8b42dd2036ff35cdb0b9f4ed4a34662c1b7 +size 48008 diff --git a/libjaylink.changes b/libjaylink.changes index 91fd651..226695a 100644 --- a/libjaylink.changes +++ b/libjaylink.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Nov 29 16:03:33 UTC 2015 - afaerber@suse.de + +- Fix %post and %postun +* Move udev rules to base libjaylink package +- Add _service for automating updates from Git +* This changes the version/release scheme slightly +- Update to latest master +* Includes workaround for reading serial number on old devices + ------------------------------------------------------------------- Sun Oct 25 02:02:04 UTC 2015 - afaerber@suse.de diff --git a/libjaylink.spec b/libjaylink.spec index b4d36db..4b1437b 100644 --- a/libjaylink.spec +++ b/libjaylink.spec @@ -17,14 +17,13 @@ Name: libjaylink -Version: 0.1.0 -Release: .391fbc3 +Version: 0.1.0~git.1448393144.7e0508d +Release: 0 Url: http://git.zapb.de/libjaylink.git Summary: USB interface library for J-Link License: GPL-2.0+ Group: Development/Tools/Debuggers -# git archive --format=tar --prefix=libjaylink master | xz --stdout > libjaylink.tar.xz -Source: libjaylink.tar.xz +Source: libjaylink-%{version}.tar.xz BuildRequires: autoconf >= 2.69 BuildRequires: automake BuildRequires: libtool @@ -35,12 +34,15 @@ BuildRequires: xz BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(post): udev Requires(postun): udev +%define _udevdir %(pkg-config --variable udevdir udev) +Provides: libjaylink0:%{_udevdir}/rules.d/99-libjaylink.rules %description Library for accessing Segger J-Link USB devices. %package -n libjaylink0 Summary: USB interface library for J-Link +Recommends: libjaylink %description -n libjaylink0 Library for accessing Segger J-Link USB devices. @@ -54,10 +56,8 @@ Library for accessing Segger J-Link USB devices. This sub-package contains development files. -%define _udevdir %(pkg-config --variable udevdir udev) - %prep -%setup -q -n libjaylink +%setup -q %build ./autogen.sh @@ -75,17 +75,24 @@ rm -f %{buildroot}%{_libdir}/libjaylink.la mkdir -p %{buildroot}%{_udevdir}/rules.d cat contrib/99-libjaylink.rules | sed -e 's/GROUP="plugdev"/GROUP="users"/' > %{buildroot}%{_udevdir}/rules.d/99-libjaylink.rules -%post -p /sbin/ldconfig +%post %udev_rules_update -%postun -p /sbin/ldconfig +%postun %udev_rules_update +%post -n libjaylink0 -p /sbin/ldconfig + +%postun -n libjaylink0 -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc COPYING +%{_udevdir}/rules.d/99-libjaylink.rules + %files -n libjaylink0 %defattr(-,root,root,-) -%doc COPYING %{_libdir}/libjaylink.so.0* -%{_udevdir}/rules.d/99-libjaylink.rules %files devel %defattr(-,root,root,-) diff --git a/libjaylink.tar.xz b/libjaylink.tar.xz deleted file mode 100644 index c6a0dba..0000000 --- a/libjaylink.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a36e5ec17ab85145706f945ff6c276e2b08cace3629774917b1baa7bf36c2b8 -size 48120