From b89528d47ac254c6f567488f80e811c83e2f3f9e Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 19:36:08 +0100 Subject: [PATCH] package created using the webbuild interface [release 1.0.1-1mamba;Wed Aug 30 2023] --- README.md | 2 + xdg-utils-cxx-1.0.1-fix_install_path.patch | 21 ++++++ xdg-utils-cxx-1.0.1-fix_so_version.patch | 33 +++++++++ xdg-utils-cxx.spec | 82 ++++++++++++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 xdg-utils-cxx-1.0.1-fix_install_path.patch create mode 100644 xdg-utils-cxx-1.0.1-fix_so_version.patch create mode 100644 xdg-utils-cxx.spec diff --git a/README.md b/README.md index 1c78a36..bf014f2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # xdg-utils-cxx +Implementation of the FreeDesktop specifications to be used in c++ projects. + diff --git a/xdg-utils-cxx-1.0.1-fix_install_path.patch b/xdg-utils-cxx-1.0.1-fix_install_path.patch new file mode 100644 index 0000000..1e7fce2 --- /dev/null +++ b/xdg-utils-cxx-1.0.1-fix_install_path.patch @@ -0,0 +1,21 @@ +Origin: Assassin +Author: Scarlett Moore +Date: Mon, 8 Feb 2021 +Subject: Fix install path. +Description: Ease consumers using this library by installing the libs +in a standard location. +Applied-Upstream: https://github.com/azubieta/xdg-utils-cxx/pull/17 + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6ec2686..06c9275 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -3,7 +3,7 @@ set(PROJECT_INCLUDEDIR ${PROJECT_SOURCE_DIR}/include) + + # Install variables + set(PROJECT_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/XdgUtils) +-set(PROJECT_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}/XdgUtils) ++set(PROJECT_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) + set(PROJECT_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) + + set(PROJECT_COMPONENT ${PROJECT_NAME}) diff --git a/xdg-utils-cxx-1.0.1-fix_so_version.patch b/xdg-utils-cxx-1.0.1-fix_so_version.patch new file mode 100644 index 0000000..0248f49 --- /dev/null +++ b/xdg-utils-cxx-1.0.1-fix_so_version.patch @@ -0,0 +1,33 @@ +Origin: Assassin +Date: Mon, 8 Feb 2021 +Author: Scarlett Moore +Subject: Fix SO Version +Description: Fix the version to generate correct SO Version so that +symbols can be generated and shlibs can correctly do it's job. +Applied-Upstream: https://github.com/azubieta/xdg-utils-cxx/pull/17 + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d22314..8dab65a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 3.0) + project(XdgUtils) +-set(PROJECT_VERSION 0.1.1) ++set(PROJECT_VERSION 1.0.1) + set(PROJECT_DESCRIPTION "Freedesktop standards C++ implementation") + set(PROJECT_HOMEPAGE_URL https://github.com/azubieta/xdg-utils-cxx) + +diff --git a/cmake/module_utils.cmake b/cmake/module_utils.cmake +index 2e7fe19..a615aa9 100644 +--- a/cmake/module_utils.cmake ++++ b/cmake/module_utils.cmake +@@ -23,6 +23,7 @@ function(add_xdgutils_module name srcs) + PREFIX "lib${PROJECT_NAME}" + PUBLIC INTERFACE_LINK_DIRECTORIES $ + PUBLIC INTERFACE_LINK_DIRECTORIES $ ++ VERSION ${PROJECT_VERSION} + ) + endfunction() + diff --git a/xdg-utils-cxx.spec b/xdg-utils-cxx.spec new file mode 100644 index 0000000..2470b67 --- /dev/null +++ b/xdg-utils-cxx.spec @@ -0,0 +1,82 @@ +Name: xdg-utils-cxx +Version: 1.0.1 +Release: 1mamba +Summary: Implementation of the FreeDesktop specifications to be used in c++ projects +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/azubieta/xdg-utils-cxx +Source: https://github.com/azubieta/xdg-utils-cxx.git/v%{version}/xdg-utils-cxx-%{version}.tar.bz2 +Patch0: xdg-utils-cxx-1.0.1-fix_so_version.patch +Patch1: xdg-utils-cxx-1.0.1-fix_install_path.patch +License: MIT +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRequires: cmake +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description +Implementation of the FreeDesktop specifications to be used in c++ projects. + +%package -n lib%{name} +Group: System/Libraries +Summary: Shared libraries for %{name} + +%description -n lib%{name} +Implementation of the FreeDesktop specifications to be used in c++ projects. +This package contains shared libraries for %{name}. + +%package -n lib%{name}-devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description -n lib%{name}-devel +Implementation of the FreeDesktop specifications to be used in c++ projects. +This package contains libraries and header files for developing applications that use %{name}. + +%debug_package + +%prep +%setup -q +%patch 0 -p1 -b .fix_so_version +%patch 1 -p1 -b .fix_install_path + +%build +%cmake \ + -DXDG_UTILS_SHARED=ON + +%cmake_build +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%cmake_install + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n lib%{name} -p /sbin/ldconfig +%postun -n lib%{name} -p /sbin/ldconfig + +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/libXdgUtilsBaseDir.so.* +%{_libdir}/libXdgUtilsDesktopEntry.so.* +%doc LICENSE + +%files -n lib%{name}-devel +%defattr(-,root,root) +%dir %{_includedir}/XdgUtils +%{_includedir}/XdgUtils/* +%{_libdir}/libXdgUtilsBaseDir.so +%{_libdir}/libXdgUtilsDesktopEntry.so +%dir %{_libdir}/cmake/XdgUtils +%{_libdir}/cmake/XdgUtils/XdgUtils*.cmake +%doc README.md + +%changelog +* Wed Aug 30 2023 Silvan Calarco 1.0.1-1mamba +- package created using the webbuild interface