%global ALTERNATIVES %{_bindir}/alternatives %global version_schily 2024-03-21 # Use a specific order for building as libraries are linked to each other: %global components libschily libdeflt libmdigest libfind librmt star Name: star Version: %(echo %version_schily | tr '-' '.') Release: 1%{?dist} Epoch: 1 Summary: An archiving tool with ACL support License: CDDL-1.0 and GPLv2 and LGPL-2.1 and BSD-2-Clause and BSD-3-Clause URL: https://codeberg.org/schilytools/schilytools Source0: %{url}/archive/%{version_schily}.tar.gz#/schily-%{version_schily}.tar.gz BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: libattr-devel libacl-devel libtool libselinux-devel libcap-devel BuildRequires: make e2fsprogs-devel %description tar saves many files together into a single tape or disk archive, and can restore individual files from the archive. Star supports ACL. %package -n scpio Summary: Copy file archives in and out (LEGACY) %description -n scpio The scpio utility, depending on the options used: copies files to an archive file, extracts files from an archive file, lists files from an archive file or copies files from one directory tree to another. %package -n spax Summary: Portable archive exchange Requires(post): %{ALTERNATIVES} Requires(preun): %{ALTERNATIVES} %description -n spax The pax utility shall read and write archives, write lists of the members of archive files and copy directory hierarchies as is defined in IEEE Std 1003.1. %package libs Summary: Libraries for %{name} Provides: star-libs = %{epoch}:%{version}-%{release} Obsoletes: star-libs <= %{epoch}:2023.09.28-1 %description libs This package provides the shared libraries for star. %prep %autosetup -p1 -n schilytools # Convert files to utf8 for german letters: for i in \ $(find . -name "*.1") \ $(find . -name "*.8") \ $(find . -name "README*") \ $(find . -name "THANKS*"); do iconv -f iso-8859-1 $i -t utf-8 -o $i.new && mv -f $i.new $i done %build make_command() { cd $i make -f Makefile \ CPPOPTX="%{build_cxxflags} -Wno-incompatible-pointer-types -Wno-old-style-definition" \ COPTX="%{build_cflags} -Wno-incompatible-pointer-types -Wno-old-style-definition" \ GMAKE_NOWARN=true \ LINKMODE="dynamic" \ NOECHO= \ RUNPATH= \ $* cd - } for i in %{components}; do make_command config make_command all done %install for i in %{components}; do cd $i make -f Makefile \ DESTDIR=%{buildroot} \ GMAKE_NOWARN=true \ INS_BASE=%{_prefix} \ INS_RBASE=/ \ LINKMODE="dynamic" \ NOECHO= \ RUNPATH= \ install cd - done # Move libraries to the appropriate place on 64 bit arches if [ %{_libdir} != %{_prefix}/lib ]; then mkdir -p %{buildroot}%{_libdir} mv %{buildroot}%{_prefix}/lib/lib*.so.* %{buildroot}%{_libdir} fi # Make binaries executable chmod 755 %{buildroot}%{_libdir}/lib*.so* %{buildroot}%{_bindir}/* # XXX Nuke unpackaged files. ( cd ${RPM_BUILD_ROOT} rm -fv .%{_bindir}/mt rm -fv .%{_bindir}/smt rm -fv .%{_bindir}/tartest rm -fv .%{_bindir}/tar rm -fv .%{_bindir}/gnutar rm -fv .%{_bindir}/star_fat rm -fv .%{_bindir}/star_sym rm -fv .%{_bindir}/suntar rm -fv .%{_sysconfdir}/default/star rm -rfv .%{_prefix}%{_sysconfdir} rm -rfv .%{_prefix}/include rm -rfv .%{_prefix}/lib # hard-wired intently rm -rfv .%{_mandir}/man3 rm -rfv .%{_mandir}/man5/{makefiles,makerules}.5* rm -rfv .%{_mandir}/man1/{tartest,gnutar,smt,mt,suntar,match}.1* rm -rfv .%{_docdir}/star/testscripts rm -rfv .%{_docdir}/star/TODO rm -rfv .%{_docdir}/rmt rm -rfv .%{_libdir}/*.so rm -rfv .%{_docdir} #install documents directly in the files section ) %global general_docs \ %dir %{_pkgdocdir} \ # %check # for i in %{components}; do # cd $i # make -f Makefile \ # GMAKE_NOWARN=true \ # LINKMODE="dynamic" \ # NOECHO= \ # RUNPATH= \ # tests # cd - # done # "desired" alternative constants %global ALT_NAME pax %global ALT_LINK %{_bindir}/pax %global ALT_SL1_NAME pax-man %global ALT_SL1_LINK %{_mandir}/man1/pax.1.gz # "local" alternative constants %global ALT_PATH %{_bindir}/spax %global ALT_SL1_PATH %{_mandir}/man1/spax.1.gz %files -n star %doc star/STARvsGNUTAR %doc star/README.* %doc star/README %{_bindir}/star %{_bindir}/ustar %{_mandir}/man1/star.1* %{_mandir}/man1/ustar.1* %{_mandir}/man5/star.5* %files -n scpio %general_docs %doc %{_mandir}/man1/scpio.1* %{_bindir}/scpio %files -n spax %general_docs %doc %{_mandir}/man1/spax.1* %{_bindir}/spax %ghost %verify(not md5 size mode mtime) %{ALT_LINK} %ghost %verify(not md5 size mode mtime) %{ALT_SL1_LINK} %files libs %license COPYING GPL-2.0.txt LGPL-2.1.txt CDDL.Schily.txt AN-2024-03-21 CONTRIBUTORS %doc README %{_libdir}/libdeflt.so.1.0 %{_libdir}/libfind.so.4.0 %{_libdir}/libmdigest.so.1.0 %{_libdir}/libschily.so.2.0 %{_libdir}/librmt.so.1.0 %changelog * Fri Aug 08 2025 David Wang 1:2024.03.21-1 - Draft release - Update to new maintained fork at Codeberg: https://codeberg.org/schilytools/schilytools