tomh / rpms / libnitrokey

Forked from rpms/libnitrokey 5 years ago
Clone
Blob Blame History Raw
Name:           libnitrokey
Version:        3.4.1
Release:        1%{?dist}
Summary:        Communicate with Nitrokey stick devices in a clean and easy manner

License:        LGPLv3+
URL:            https://github.com/Nitrokey/libnitrokey
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

Patch0001:      0001-Allow-for-patch-field-in-library-version-getter-test.patch
Patch0002:      0002-add-meson-buildsystem-definitions.patch
Patch0003:      0003-Update-meson-definition-to-v3.4.1.patch
Patch0004:      0004-Mention-build-with-meson-in-the-Readme.patch
Patch0005:      0005-meson-add-support-for-generated-VCS-tag.patch
Patch0006:      0006-meson-fix-sneaky-typo-of-the-library-name.patch
Patch0007:      0007-meson-test_minimal-is-written-in-C.patch
Patch0008:      0008-meson-fix-usage-of-system-wide-catch.patch
Patch0009:      0009-meson-add-support-for-bundled-catch.patch
Patch0010:      0010-meson-improve-generation-of-vcs_tag.patch
Patch0011:      0011-meson-install-udev-rules.patch

BuildRequires:  meson >= 0.44.0
BuildRequires:  gcc-c++
# For one of tests
BuildRequires:  gcc
BuildRequires:  pkgconfig(hidapi-libusb)
BuildRequires:  pkgconfig(catch)
BuildRequires:  pkgconfig(udev)

%description
Libnitrokey is a project to communicate with Nitrokey Pro and Storage devices
in a clean and easy manner.

%package devel
Summary:        Development libraries and header files for %{name}
Requires:       %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
# Headers have #include for hidapi.h
Requires:       hidapi-devel%{?_isa}

%description devel
This package contains development libraries and header files are needed
to develop using libnitrokey.

%prep
%autosetup -p1
# Remove inttypes.h
rm -vrf include/inttypes.h
# Remove catch
rm -vrf unittest/Catch
# Remove hidapi
rm -vrf hidapi include/hidapi
# Remove Ubuntism
sed -i -e 's/GROUP+\?="plugdev", //' data/41-nitrokey.rules
! grep plugdev data/41-nitrokey.rules

%build
%meson \
  -Doffline-tests=true \
  %{nil}
%meson_build

%install
%meson_install

%check
%meson_test

%ldconfig_scriptlets

%files
%license LICENSE
%doc README.md
%{_libdir}/libnitrokey.so.*
%{_udevrulesdir}/*-nitrokey.rules

%files devel
%{_libdir}/libnitrokey.so
%{_libdir}/pkgconfig/libnitrokey-1.pc
%{_includedir}/libnitrokey/

%changelog
* Wed Jul 18 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.4.1-1
- Update to 3.4.1

* Tue Jul 17 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.4-1
- Update to 3.4

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri Jun 15 2018 Ed Marshall <esm@logic.net> - 3.3-1
- Update to 3.3

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Jan 31 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.1-2
- Switch to %%ldconfig_scriptlets

* Tue Oct 17 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.1-1
- Update to 3.1

* Sat Oct 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.0-0.2.20171007git.fa871ec
- Update to latest snapshot

* Sat Oct 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.0-0.1.20171007git.544f69c
- Initial package