SHA256
1
0
forked from pool/fillup
fillup/fillup.spec
2012-02-09 07:43:10 +00:00

96 lines
2.7 KiB
RPMSpec

#
# spec file for package fillup
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: fillup
Provides: aaa_base:/bin/fillup
Version: 1.42
Release: 0
Summary: Tool for Merging Config Files
License: GPL-2.0+
Group: System/Base
Source: fillup-%{version}.tar.bz2
Patch: fillup-optflags.patch
Patch1: fillup-warnings.dif
Patch2: fillup-%{version}.dif
Patch3: fillup-retval.dif
Patch4: fillup-nodate.patch
Patch5: fillup-1.42-cloexec.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define fillup_info_entry * fillup: (fillup) fillup. SuSE-fillup-tool.
%description
fillup merges files that hold variables. A variable is defined by an
entity composed of a preceding comment, a variable name, an assignment
delimiter, and a related variable value. A variable is determined by
its variable name.
%prep
%setup -q
%patch
%patch1 -p1
%patch2 -p0
%patch3 -p0
%patch4 -p0
%patch5
%build
#
# Be sure that the tests for fillup are run in
# DEBUG mode for comparision with the references
#
# build time testing disabled when cross-compiling
%if !0%{?_crossbuild}
make %{?_smp_mflags} clean
make %{?_smp_mflags} test OPTISPLUS="$RPM_OPT_FLAGS"
#
# For the real world make clean and use the
# optimzed version.
#
make %{?_smp_mflags} clean
%else
# build system does not always honor CC; workaround:
echo -e "#!/bin/bash\nexec %__cc \"\$@\"" >gcc
chmod 755 gcc
export PATH=`pwd`:$PATH
%endif
make %{?_smp_mflags} compile COMPILE_OPTION=OPTIMIZE OPTISPLUS="$RPM_OPT_FLAGS" CC="%__cc"
%install
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
#
# install fillup
#
install -d -m 755 $RPM_BUILD_ROOT/%{_bindir}
install -m 755 BIN/fillup $RPM_BUILD_ROOT/%{_bindir}
#UsrMerge
install -d -m 755 $RPM_BUILD_ROOT/bin
ln -sf %{_bindir}/fillup $RPM_BUILD_ROOT/bin
#EndUserMerge
install -d $RPM_BUILD_ROOT/%{_mandir}/man8
install -m 644 SGML/fillup.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8
%files
%defattr(-,root,root)
#UsrMerge
/bin/fillup
#EndUserMerge
%{_bindir}/fillup
%{_mandir}/man8/fillup*
%changelog