From 9424e9b53c51797f3ae5e396b3ba020abf59478b Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Thu, 23 Nov 2017 15:27:33 +0100 Subject: [PATCH] specfile: build sections updated for visual distinction --- tcsh.spec | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/tcsh.spec b/tcsh.spec index 13fb025..3ad7a52 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -1,3 +1,15 @@ +# === GLOBAL MACROS =========================================================== + +# According to Fedora Package Guidelines, it is advised that packages that can +# process untrusted input are build with position-independent code (PIC). +# +# Koji should override the compilation flags and add the -fPIC or -fPIE flags by +# default. This is here just in case this wouldn't happen for some reason. +# For more info: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE +%global _hardened_build 1 + +# ============================================================================= + Name: tcsh Summary: An enhanced version of csh, the C shell Version: 6.20.00 @@ -23,15 +35,6 @@ BuildRequires: gettext-devel BuildRequires: git BuildRequires: ncurses-devel -# GLOBAL MACROS: -# -------------- - -# Some people use tcsh as their login shell, which might be long running. -# Koji should override the compilation flags and add the -fPIC or -fPIE flags by -# default. This is here just in case - for some unexpected resons. -# For more info: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE -%global _hardened_build 1 - # ============================================================================= # NOTE: 'autosetup' macro (below) uses 'git' for applying the patches: @@ -76,6 +79,7 @@ shell and as a shell script command processor. Tcsh includes a command line editor, programmable word completion, spelling correction, a history mechanism, job control and a C language like syntax. +# === BUILD INSTRUCTIONS ====================================================== # Call the 'autosetup' macro to prepare the environment, but do not patch the # source code yet -- we need to convert the 'Fixes' file first: @@ -97,15 +101,18 @@ git add --all --force git commit --all --amend --no-edit > /dev/null %autopatch -p1 +# --------------- %build %configure make %{?_smp_mflags} all +# --------------- %check make check +# --------------- %install mkdir -p %{buildroot}%{_bindir} @@ -139,6 +146,7 @@ ru russian uk ukrainian _EOF +# --------------- %post # Add login shell entries to /etc/shells only when installing the package @@ -157,6 +165,7 @@ if [[ "$1" -eq 1 ]]; then fi fi +# --------------- %postun # Remove the login shell lines from /etc/shells only when uninstalling: @@ -167,6 +176,7 @@ if [[ "$1" -eq 0 && -f %{_sysconfdir}/shells ]]; then sed -i -e '\!^%{_bindir}/tcsh$!d' %{_sysconfdir}/shells fi +# === PACKAGING INSTRUCTIONS ================================================== %files -f %{name}.lang %doc FAQ Fixes README.md complete.tcsh @@ -175,6 +185,7 @@ fi %{_bindir}/csh %{_mandir}/man1/*.1* +# ============================================================================= %changelog * Thu Aug 03 2017 Fedora Release Engineering - 6.20.00-7