# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Summary: A utility that maintains a system's symbolic links Name: symlinks URL: http://ibiblio.org/pub/Linux/utils/file/ Version: 1.7 Release: 2.0.cf.%{__distinit}%{__distvers} License: Symlinks # Upstream maintainer provided tarball, ibiblio no longer allowing uploads Source0: http://ibiblio.org/pub/Linux/utils/file/symlinks-%{version}.tar.gz # Taken from http://packages.debian.org/changelogs/pool/main/s/symlinks/symlinks_1.2-4.2/symlinks.copyright Source1: symlinks-LICENSE.txt BuildRequires: coreutils BuildRequires: gcc BuildRequires: make %description The symlinks utility performs maintenance on symbolic links. Symlinks checks for symlink problems, including dangling symlinks that point to non-existent files. Symlinks can also automatically convert absolute symlinks to relative symlinks. Install the symlinks package if you need a program for maintaining symlinks on your system. %prep %setup -q cp %{SOURCE1} . %build make CFLAGS="%{optflags} $(getconf LFS_CFLAGS) %{?build_ldflags}" %{?_smp_mflags} %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_mandir}/man1 install -m 755 symlinks %{buildroot}%{_bindir} install -m 644 symlinks.1 %{buildroot}%{_mandir}/man1 %files %license symlinks-LICENSE.txt %{_bindir}/symlinks %{_mandir}/man1/symlinks.1* %changelog * Mon Apr 14 2025 Paul Howarth - 1.7-2.0.cf - Use SPDX-format license tag * Mon Mar 28 2022 Paul Howarth - 1.7-1.0.cf - Update to 1.7 - Use %%license unconditionally * Thu Nov 1 2018 Paul Howarth - 1.4-21.0.cf - Fix partial build flags injection (#1573111) - Fixed upstream URL reference * Wed Aug 9 2017 Paul Howarth - 1.4-16.0.cf - Use %%license where possible - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section - Drop %%defattr * Tue Aug 2 2011 Paul Howarth - 1.4-5.0.cf - Fix dist tag for CentOS 6 and Scientific Linux * Fri May 20 2011 Paul Howarth - 1.4-4.0.cf - Applied patches from Jiri Popelka: - Fix off-by-one error in call to readlink - Fix possible buffer overrun found by coverity - Nobody else likes macros for commands * Tue May 18 2010 Paul Howarth - 1.4-3.0.cf - Fix dist tag for RHEL-6 Beta * Mon Nov 16 2009 Paul Howarth - 1.4-2.0.cf - Update to 1.4 (all patches upstreamed) - Rawhide dist tag no longer needs to be special-cased * Tue Mar 3 2009 Paul Howarth - 1.2-33.0.cf - Import from Fedora (needed for RHL9 builds due to #89655) * Wed Feb 25 2009 Fedora Release Engineering - 1.2-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Sep 6 2008 Tom "spot" Callaway 1.2-32 - fix license tag * Mon Feb 11 2008 Tim Waugh 1.2-31 - Rebuild for GCC 4.3. * Wed Aug 29 2007 Tim Waugh 1.2-30 - Rebuilt. * Fri Feb 23 2007 Tim Waugh 1.2-29 - Use smp_mflags (bug #226445). - Better default attributes (bug #226445). - Make setup macro quiet (bug #226445). - Clean build root in %%install section (bug #226445). * Wed Feb 7 2007 Tim Waugh 1.2-28 - Fixed build root (bug #226445). * Tue Feb 6 2007 Tim Waugh 1.2-27 - Fixed summary (bug #226445). - Added token URL tag (bug #226445). * Tue Jan 30 2007 Florian La Roche - 1.2-26 - do not strip away debuginfo * Thu Jan 18 2007 Tim Waugh - 1.2-25 - Build with LFS support (bug #206407). * Wed Jul 12 2006 Jesse Keating - 1.2-24.2.2 - rebuild * Fri Feb 10 2006 Jesse Keating - 1.2-24.2.1 - bump again for double-long bug on ppc(64) * Tue Feb 07 2006 Jesse Keating - 1.2-24.2 - rebuilt for new gcc4.1 snapshot and glibc changes * Fri Dec 09 2005 Jesse Keating - rebuilt * Wed Mar 2 2005 Tim Waugh 1.2-24 - Rebuild for new GCC. * Wed Feb 9 2005 Tim Waugh 1.2-23 - s/Copyright:/License:/. * Tue Jun 15 2004 Elliot Lee - rebuilt * Fri Feb 13 2004 Elliot Lee - rebuilt * Thu Oct 16 2003 Florian La Roche - add patch from #89655 * Wed Jun 04 2003 Elliot Lee - rebuilt * Wed Jan 22 2003 Tim Powers - rebuilt * Wed Dec 11 2002 Tim Powers 1.2-17 - rebuild on all arches * Fri Jun 21 2002 Tim Powers - automated rebuild * Thu May 23 2002 Tim Powers - automated rebuild * Wed Jan 09 2002 Tim Powers - automated rebuild * Sun Jun 24 2001 Elliot Lee - Bump release + rebuild. * Wed Jul 12 2000 Prospector - automatic rebuild * Tue Jun 13 2000 Preston Brown - FHS paths * Tue May 30 2000 Preston Brown - fix up help output (#10236) * Thu Feb 10 2000 Preston Brown - do not link statically * Mon Feb 07 2000 Preston Brown - rebuild to gzip man page * Mon Oct 04 1999 Cristian Gafton - rebuild against the latest glibc in the sparc tree * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 5) * Wed Feb 24 1999 Preston Brown - Injected new description and group. * Fri Dec 18 1998 Preston Brown - bumped spec number for initial rh 6.0 build * Mon Apr 27 1998 Prospector System - translations modified for de, fr, tr * Mon Oct 20 1997 Otto Hammersmith - changed build root to /var/tmp, not /var/lib - updated to version 1.2 * Wed Jul 09 1997 Erik Troan - built against glibc - build-rooted