%global forgeurl https://github.com/jbruchon/libjodycode Version: 2.0.1 %forgemeta Name: libjodycode Release: 2%{?dist} Summary: General purpose utility functions License: MIT URL: %{forgeurl} Source0: %{forgesource} # The Makefile installs the shared libraries incorrectly for Fedora. # The symlinks needed to be corrected and the main library needs to # carry 0755 permissions. The Makefile also prevented an override of # the PREFIX from /usr/local, which needs to be /usr for Fedora. Patch0: libjodycode-2.0.1-Makefile.patch BuildRequires: gcc BuildRequires: make %description libjodycode is a software code library containing code shared among several of the programs written by Jody Bruchon such as imagepile, jdupes, winregfs, and zeromerge. These shared pieces of code were copied between each program as they were updated. As the number of programs increased and keeping these pieces of code synced became more annoying, the decision was made to combine all of them into a single reusable shared library. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %forgeautosetup -p1 %build %make_build HARDEN=1 LIB_DIR="%{_libdir}" %install %make_install HARDEN=1 LIB_DIR="%{_libdir}" # Do not include the static library rm -f %{buildroot}%{_libdir}/libjodycode.a # man page is currently empty rm -rf %{buildroot}%{_mandir}/man7 %files %license LICENSE %doc CHANGES README.md %{_libdir}/libjodycode.so.* %files devel %{_includedir}/libjodycode.h %{_libdir}/libjodycode.so %changelog * Thu Jun 15 2023 David Cantrell - 2.0.1-2 - Add a comment explaining Patch0 is for building and packaging on Fedora - Use %%forgeautosetup macro in %%prep - Do not package the static library - Move the header file to the devel subpackage - Do not use CFLAGS_EXTRA as that just duplicates the CFLAGS again * Tue Jun 13 2023 David Cantrell - 2.0.1-1 - Initial package