File libzbd.spec of Package libzbd
#
# spec file for package libzbd
#
# Copyright (c) 2021 Western Digital Corporation
#
# 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 https://bugs.opensuse.org/
#
Name: libzbd
%define so_ver 2
%define lname %{name}%{so_ver}
Version: 2.0.2
Release: 0
Summary: A library to control zoned block devices
License: LGPL-3.0-or-later AND GPL-3.0-or-later
URL: https://github.com/westerndigitalcorporation/%{name}
Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: autoconf-archive
BuildRequires: automake
BuildRequires: desktop-file-utils
BuildRequires: gcc
BuildRequires: libtool
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gail-3.0)
BuildRequires: pkgconfig(gdk-3.0)
BuildRequires: pkgconfig(gdk-broadway-3.0)
BuildRequires: pkgconfig(gdk-wayland-3.0)
BuildRequires: pkgconfig(gdk-x11-3.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gtk+-broadway-3.0)
BuildRequires: pkgconfig(gtk+-unix-print-3.0)
BuildRequires: pkgconfig(gtk+-wayland-3.0)
BuildRequires: pkgconfig(gtk+-x11-3.0)
%description
libzbd is a library providing functions simplifying the management and
use of zoned block devices using the kernel ioctl interface.
%package -n %{lname}
Summary: Zoned block device management library
Group: Development/Libraries/C and C++
%description -n %{lname}
libzbd is a library providing functions simplifying the management and
use of zoned block devices using the kernel ioctl interface.
# Development headers package
%package devel
Summary: Development header files for libzbd
Requires: %{lname} = %{version}
%description devel
This package provides development header files for libzbd.
# Command line tools package
%package cli-tools
Summary: Command line tools using libzbd
Requires: %{lname} = %{version}
%description cli-tools
This package provides command line tools using libzbd.
# Graphic tools package
%package gtk-tools
Summary: GTK tools using libzbd
Requires: %{lname} = %{version}
%description gtk-tools
This package provides GTK-based graphical tools using libzbd.
%prep
%autosetup
%build
sh autogen.sh
%configure --libdir="%{_libdir}" --includedir="%{_includedir}"
%make_build
%install
%make_install PREFIX=%{_prefix}
chmod -x %{buildroot}%{_mandir}/man8/*.8*
find %{buildroot} -type f -name "*.la" -delete -print
desktop-file-validate %{buildroot}/%{_datadir}/applications/gzbd.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/gzbd-viewer.desktop
%ldconfig_scriptlets -n %{lname}
%files -n %{lname}
%{_libdir}/*.so.*
%exclude %{_libdir}/*.a
%exclude %{_libdir}/pkgconfig/*.pc
%license LICENSES/LGPL-3.0-or-later.txt
%doc README.md
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%files cli-tools
%{_bindir}/zbd
%{_mandir}/man8/zbd.8%{?ext_man}
%files gtk-tools
%{_bindir}/gzbd
%{_datadir}/applications/gzbd.desktop
%{_datadir}/pixmaps/gzbd.png
%{_bindir}/gzbd-viewer
%{_datadir}/polkit-1/
%{_datadir}/polkit-1/actions/
%{_datadir}/polkit-1/actions/org.gnome.gzbd-viewer.policy
%{_datadir}/polkit-1/actions/org.gnome.gzbd.policy
%{_datadir}/applications/gzbd-viewer.desktop
%{_datadir}/pixmaps/gzbd-viewer.png
%{_mandir}/man8/gzbd.8%{?ext_man}
%{_mandir}/man8/gzbd-viewer.8%{?ext_man}
%changelog