diff --git a/qtkeychain-0.11.1.tar.gz b/qtkeychain-0.11.1.tar.gz new file mode 100644 index 0000000..1810d4e Binary files /dev/null and b/qtkeychain-0.11.1.tar.gz differ diff --git a/qtkeychain.spec b/qtkeychain.spec new file mode 100644 index 0000000..865eda3 --- /dev/null +++ b/qtkeychain.spec @@ -0,0 +1,117 @@ +%bcond_without qt4 + +Name: qtkeychain +Version: 0.11.1 +Release: 1 +Summary: A password store library + +License: BSD +Url: https://github.com/frankosterfeld/qtkeychain +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz + +BuildRequires: make +BuildRequires: gcc-c++ +BuildRequires: cmake +%if %{with qt4} +BuildRequires: pkgconfig(QtCore) +BuildRequires: pkgconfig(QtDBus) +%endif +BuildRequires: pkgconfig(libsecret-1) + +%description +The qtkeychain library allows you to store passwords easily and securely. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: pkgconfig(QtDBus) +# deps referenced in QtKeychainLibraryDepends-relwithdebinfo.cmake: IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "/usr/lib64/libQtCore.so;secret-1;gio-2.0;gobject-2.0;glib-2.0;/usr/lib64/libQtDBus.so" +# *probably* overlinking and can be pruned, but requires closer inspection +Requires: pkgconfig(libsecret-1) +%description devel +This package contains development files for qtkeychain. + +%package qt5 +Summary: %{summary} + +%description qt5 +The qt5keychain library allows you to store passwords easily and securely. + +%package qt5-devel +Summary: Development files for %{name}-qt5 +BuildRequires: qt5-qtbase-devel +BuildRequires: cmake(Qt5LinguistTools) +Requires: %{name}-qt5%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: qt5-qtbase-devel%{?_isa} +# deps referenced in Qt5KeychainLibraryDepends-relwithdebinfo.cmake: IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "Qt5::Core;secret-1;gio-2.0;gobject-2.0;glib-2.0;Qt5::DBus" +# *probably* overlinking and can be pruned, but requires closer inspection +Requires: pkgconfig(libsecret-1) + +%description qt5-devel +This package contains development files for qt5keychain. + +%prep +%autosetup -p1 + +%if %{with qt4} +mkdir %{_target_platform}-qt4 +%endif + +%build +%if %{with qt4} +%cmake -B %{_target_platform}-qt4 \ + -DBUILD_WITH_QT4:BOOL=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo + +%make_build -C %{_target_platform}-qt4 +%endif + +%cmake \ + -DBUILD_WITH_QT4:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo + +%make_build + +%install +%if %{with qt4} +%make_install -C %{_target_platform}-qt4 +%endif +%make_install + +%find_lang %{name} --with-qt + +%if %{with qt4} +grep %{_datadir}/%{name}/translations %{name}.lang > %{name}-qt4.lang +%endif +grep %{_datadir}/qt5keychain/translations %{name}.lang > %{name}-qt5.lang + +%if %{with qt4} +%files -f %{name}-qt4.lang +%doc ReadMe.txt +%license COPYING +%{_libdir}/libqtkeychain.so.1 +%{_libdir}/libqtkeychain.so.0* + +%files devel +%{_includedir}/qtkeychain/ +%{_libdir}/cmake/QtKeychain/ +%{_libdir}/libqtkeychain.so +%{_libdir}/qt5/mkspecs/modules/qt_QtKeychain.pri +%endif + +%files qt5 -f %{name}-qt5.lang +%doc ReadMe.txt +%license COPYING +%{_libdir}/libqt5keychain.so.1 +%{_libdir}/libqt5keychain.so.0* + +%files qt5-devel +%{_includedir}/qt5keychain/ +%{_libdir}/cmake/Qt5Keychain/ +%{_libdir}/libqt5keychain.so +%{_libdir}/qt5/mkspecs/modules/qt_Qt5Keychain.pri + +%changelog +* Thu Apr 27 2023 peijiankang - 0.11.1-1 +- Init Package for openEuler +