File zuluCrypt.spec of Package zuluCrypt
#
# spec file for package zuluCrypt
#
# Copyright (c) 2019 Asterios Dramis <asterios.dramis@gmail.com>.
#
# 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.
%define so_ver 1_2_0
%define so_ver_plug 1_0_0
%define so_ver_exe 1_2_0
Name: zuluCrypt
Version: 5.7.1
Release: 0
Summary: Cli and GUI Front End to cryptsetup
License: GPL-2.0-or-later
Group: Productivity/Security
URL: https://mhogomchungu.github.io/zuluCrypt/
Source0: https://github.com/mhogomchungu/zuluCrypt/releases/download/%{version}/%{name}-%{version}.tar.xz
Source1: %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE cmake_paths.patch asterios.dramis@gmail.com -- Fix CMAKE_INSTALL_LIBDIR, CMAKE_INSTALL_FULL_LIBDIR and CMAKE_INSTALL_DOCDIR path
Patch0: cmake_paths.patch
BuildRequires: cmake
BuildRequires: device-mapper-devel
BuildRequires: fdupes
BuildRequires: kwallet-devel
BuildRequires: libblkid-devel
BuildRequires: libcryptsetup-devel
BuildRequires: libgcrypt-devel
BuildRequires: libpwquality-devel
BuildRequires: libsecret-devel
BuildRequires: libuuid-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Widgets)
%description
zuluCrypt is a front end to cryptsetup. It makes it easy to use
cryptsetup to manage encrypted volumes by providing a Qt based
GUI and a simpler to use cli front end to cryptsetup.
%package devel
Summary: Development files for zuluCrypt
Group: Development/Libraries/C and C++
Requires: libzuluCrypt%{so_ver} = %{version}
Requires: libzuluCrypt-exe%{so_ver_exe} = %{version}
Requires: libzuluCryptPluginManager%{so_ver_plug} = %{version}
%description devel
This package includes development files for zuluCrypt.
%package -n libzuluCrypt%{so_ver}
Summary: Cli and GUI Front End to cryptsetup
Group: System/Libraries
%description -n libzuluCrypt%{so_ver}
zuluCrypt is a front end to cryptsetup. It makes it easy to use
cryptsetup to manage encrypted volumes by providing a Qt based
GUI and a simpler to use cli front end to cryptsetup.
%package -n libzuluCryptPluginManager%{so_ver_plug}
Summary: Cli and GUI Front End to cryptsetup
Group: System/Libraries
%description -n libzuluCryptPluginManager%{so_ver_plug}
zuluCrypt is a front end to cryptsetup. It makes it easy to use
cryptsetup to manage encrypted volumes by providing a Qt based
GUI and a simpler to use cli front end to cryptsetup.
%package -n libzuluCrypt-exe%{so_ver_exe}
Summary: Cli and GUI Front End to cryptsetup
Group: System/Libraries
%description -n libzuluCrypt-exe%{so_ver_exe}
zuluCrypt is a front end to cryptsetup. It makes it easy to use
cryptsetup to manage encrypted volumes by providing a Qt based
GUI and a simpler to use cli front end to cryptsetup.
%prep
%setup -q
%patch0 -p1
%build
%cmake \
-DUDEVSUPPORT=true \
-DUSE_POLKIT=true \
-DCMAKE_INSTALL_DOCDIR=%{_defaultdocdir}/%{name}
%make_jobs
%install
%cmake_install
# Fix executable name in desktop files
sed -i -e "s,%{_bindir}/zuluCrypt-gui,zuluCrypt-gui," %{buildroot}%{_datadir}/applications/zuluCrypt.desktop
sed -i -e "s,%{_bindir}/zuluMount-gui,zuluMount-gui," %{buildroot}%{_datadir}/applications/zuluMount.desktop
# Fix rpmlint warning "script-without-shebang"
chmod 644 %{buildroot}%{_datadir}/applications/zuluCrypt.desktop
chmod 644 %{buildroot}%{_datadir}/applications/zuluMount.desktop
# Remove unneeded files
rm -f %{buildroot}%{_datadir}/icons/*.png
%fdupes -s %{buildroot}
%post -n libzuluCrypt%{so_ver} -p /sbin/ldconfig
%postun -n libzuluCrypt%{so_ver} -p /sbin/ldconfig
%post -n libzuluCryptPluginManager%{so_ver_plug} -p /sbin/ldconfig
%postun -n libzuluCryptPluginManager%{so_ver_plug} -p /sbin/ldconfig
%post -n libzuluCrypt-exe%{so_ver_exe} -p /sbin/ldconfig
%postun -n libzuluCrypt-exe%{so_ver_exe} -p /sbin/ldconfig
%files
%license COPYING GPLv2 GPLv3 LICENSE
%doc README README.md TODO changelog docs/zuluCrypt.pdf
%{_bindir}/zulu*
%{_datadir}/applications/zulu*.desktop
%{_datadir}/icons/hicolor/48x48/apps/*.png
%{_datadir}/mime/packages/zuluCrypt.xml
%{_datadir}/pixmaps/zulu*
%dir %{_datadir}/polkit-1/
%dir %{_datadir}/polkit-1/actions/
%{_datadir}/polkit-1/actions/org.zulucrypt.zulupolkit.policy
%{_datadir}/zuluCrypt/
%{_mandir}/man1/zulu*.1%{?ext_man}
%{_libdir}/zuluCrypt/
%files devel
%{_includedir}/zuluCrypt/
%{_libdir}/*.so
%{_libdir}/pkgconfig/libzuluCrypt.pc
%files -n libzuluCrypt%{so_ver}
%{_libdir}/libzuluCrypt.so.1.2.*
%files -n libzuluCryptPluginManager%{so_ver_plug}
%{_libdir}/libzuluCryptPluginManager.so.1.0.*
%files -n libzuluCrypt-exe%{so_ver_exe}
%{_libdir}/libzuluCrypt-exe.so.1.2.*
%changelog