libjaylink/libjaylink.spec
Ismail Dönmez 1f98a27bfb Accepting request 340806 from home:a_faerber:hardware
libjaylink is being factored out of openocd package. There is no tagged release yet. Prepare the package for early testing.

OBS-URL: https://build.opensuse.org/request/show/340806
OBS-URL: https://build.opensuse.org/package/show/hardware/libjaylink?expand=0&rev=1
2015-10-26 08:05:05 +00:00

97 lines
2.7 KiB
RPMSpec

#
# 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
Release: <RELEASE>.391fbc3
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
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
%description
Library for accessing Segger J-Link USB devices.
%package -n libjaylink0
Summary: USB interface library for J-Link
%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.
%define _udevdir %(pkg-config --variable udevdir udev)
%prep
%setup -q -n libjaylink
%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 -p /sbin/ldconfig
%udev_rules_update
%postun -p /sbin/ldconfig
%udev_rules_update
%files -n libjaylink0
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/libjaylink.so.0*
%{_udevdir}/rules.d/99-libjaylink.rules
%files devel
%defattr(-,root,root,-)
%{_includedir}/libjaylink/
%{_libdir}/libjaylink.so
%{_libdir}/pkgconfig/libjaylink.pc
%changelog