Init package

This commit is contained in:
misaka00251 2022-09-07 22:19:34 +08:00
parent ad7b9e2e58
commit 9cdfb15587
No known key found for this signature in database
GPG Key ID: 4AA100DC964EDE26
3 changed files with 111 additions and 0 deletions

107
kf5-kontactinterface.spec Normal file
View File

@ -0,0 +1,107 @@
%undefine __cmake_in_source_build
%global framework kontactinterface
# bootstrap mode
%global bootstrap 1
%if !0%{?bootstrap}
%global tests 1
%endif
Name: kf5-%{framework}
Version: 22.08.0
Release: 1
Summary: The Kontact Interface Library
License: LGPLv2+
URL: https://invent.kde.org/frameworks/%{framework}
%global revision %(echo %{version} | cut -d. -f3)
%if %{revision} >= 50
%global stable unstable
%else
%global stable stable
%endif
Source0: http://download.kde.org/%{stable}/release-service/%{version}/src/%{framework}-%{version}.tar.xz
BuildRequires: make
BuildRequires: extra-cmake-modules
BuildRequires: kf5-rpm-macros
BuildRequires: kf5-kcoreaddons-devel >= 5.15
BuildRequires: kf5-kparts-devel >= 5.15
BuildRequires: kf5-kwindowsystem-devel >= 5.15
BuildRequires: kf5-ki18n-devel >= 5.15
BuildRequires: kf5-kxmlgui-devel >= 5.15
BuildRequires: kf5-kiconthemes-devel >= 5.15
BuildRequires: libX11-devel
BuildRequires: qt5-qtbase-devel
%if 0%{?tests}
BuildRequires: dbus-x11
BuildRequires: time
BuildRequires: xorg-x11-server-Xvfb
%endif
Conflicts: kde-l10n < 17.03
%description
The Kontact Interface library provides API to integrate other applications
with Kontact.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: kf5-kparts-devel
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%autosetup -n %{framework}-%{version} -p1
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} .. \
-DBUILD_TESTING:BOOL=%{?tests:ON}%{!?tests:OFF}
popd
%make_build -C %{_target_platform}
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%find_lang %{name} --all-name --with-html
%check
%if 0%{?tests}
export CTEST_OUTPUT_ON_FAILURE=1
xvfb-run -a \
dbus-launch --exit-with-session \
time \
make test ARGS="--output-on-failure --timeout 10" -C %{_target_platform} ||:
%endif
%ldconfig_scriptlets
%files -f %{name}.lang
%license LICENSES/*
%{_kf5_datadir}/qlogging-categories5/*%{framework}.*
%{_kf5_libdir}/libKF5KontactInterface.so.*
%{_kf5_datadir}/kservicetypes5/kontactplugin.desktop
%files devel
%{_kf5_includedir}/KontactInterface/
%{_kf5_libdir}/libKF5KontactInterface.so
%{_kf5_libdir}/cmake/KF5KontactInterface/
%{_kf5_archdatadir}/mkspecs/modules/qt_KontactInterface.pri
%changelog
* Thu Jul 28 2022 misaka00251 <misaka00251@misakanet.cn> - 22.08.0-1
- Init package

View File

@ -0,0 +1,4 @@
version_control: github
src_repo: KDE/kontactinterface
tag_prefix: "^v"
separator: "."

Binary file not shown.