undertaker/undertaker.spec
2014-12-11 10:08:12 -07:00

250 lines
8.1 KiB
RPMSpec

Name: undertaker
Version: 1.6.1
Release: 1%{?dist}
Summary: Find always-on and always-off conditional C code
Group: Development/Languages
License: GPLv2 and GPLv3+
URL: http://vamos.informatik.uni-erlangen.de/trac/undertaker
Source0: http://vamos.informatik.uni-erlangen.de/files/%{name}-%{version}.tar.xz
# Adapt to new picosat API
Patch0: %{name}-picosat.patch
# Solve name clash with the satyr package
Patch1: %{name}-satyr.patch
BuildRequires: boost-devel
BuildRequires: emacs
BuildRequires: flex
BuildRequires: libpuma-devel
BuildRequires: ncurses-devel
BuildRequires: picosat-devel
BuildRequires: pstreams-devel
BuildRequires: python2-devel
BuildRequires: xemacs
BuildRequires: xemacs-packages-extra
# Needed for undertaker
Requires: picosat
# Needed for undertaker-calc-coverage
Requires: cpp
Requires: findutils
Requires: git
Requires: make
Requires: sparse
%description
The undertaker is an implementation of the Vamos project's preprocessor
and configuration analysis approaches. It can check the structure of
preprocessor directives against different configuration models to find
blocks that can't be selected or deselected.
%package emacs
Summary: Emacs support for %{name}
Group: Development/Languages
Requires: emacs(bin) >= %{_emacs_version}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description emacs
Emacs support for %{name}.
%package emacs-el
Summary: Source for Emacs support for %{name}
Group: Development/Languages
Requires: %{name}-emacs = %{version}-%{release}
BuildArch: noarch
%description emacs-el
Source Elisp code for Emacs support for %{name}.
%package xemacs
Summary: XEmacs support for %{name}
Group: Development/Languages
Requires: xemacs(bin) >= %{_xemacs_version}, xemacs-packages-extra
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description xemacs
XEmacs support for %{name}.
%package xemacs-el
Summary: Source for XEmacs support for %{name}
Group: Development/Languages
Requires: %{name}-xemacs = %{version}-%{release}
BuildArch: noarch
%description xemacs-el
Source Elisp code for XEmacs support for %{name}.
%prep
%setup -q
%patch0
%patch1
# Fix python dependencies
for fil in $(grep -FRls 'bin/env' .); do
sed -i.orig 's|env python|python|' $fil
touch -r ${fil}.orig $fil
rm -f ${fil}.orig
done
# Fix the installation path for the makefiles
sed -i "s|'\.\./lib'|'../%{libdir}/%{name}', &|" python/vamos/golem/kbuild.py
sed -ri "s,Makefile\.(list|version).*\(LIBDIR\),&/undertaker," Makefile
# Use the right flags when building and linking
sed -e "s|-Wall -Wextra -O2|$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64|" \
-e "s|^LDFLAGS =.*|LDFLAGS = $RPM_LD_FLAGS|" \
-i undertaker/Makefile
sed -e "s|^LDXX=.*|LDXX=g++ \$(CXXFLAGS)|" \
-e "s|^DEBUG =.*|DEBUG=|" \
-e "s|-Wall -Wextra -O2|$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64|" \
-i ziz/Makefile
# The Makefile thinks the man pages are compressed, but they aren't
# Fix the Makefile so we don't rebuild everything when installing, and we don't
# try to install compressed man pages when they are really not compressed
sed -e "s/\([^%]\.1\)\.gz/\1/g" \
-e "s|^install: all.*|install:|" \
-e "s|check undertaker-lcov|check install undertaker-lcov|" \
-i Makefile
# Make sure we don't use the bundled version of picosat
rm -fr picosat
%build
make %{?_smp_mflags} PREFIX=%{_prefix} LIBDIR=%{_libdir} \
ETCDIR=%{_sysconfdir} HOSTCFLAGS="${RPM_OPT_FLAGS} -D_FILE_OFFSET_BITS=64" \
HOSTCXXFLAGS="${RPM_OPT_FLAGS} -D_FILE_OFFSET_BITS=64" \
HOSTLDFLAGS="${RPM_LD_FLAGS} -Wl,--as-needed"
%install
make install DESTDIR=%{buildroot} PREFIX=%{_prefix} LIBDIR=%{_libdir} \
ETCDIR=%{_sysconfdir}
# Rename the satyr binary to avoid a conflict with the satyr package
mv -f %{buildroot}%{_bindir}/satyr %{buildroot}%{_bindir}/%{name}-satyr
# Fix permissions
chmod 0644 %{buildroot}%{_libdir}/undertaker/Makefile*
chmod 0755 %{buildroot}%{python_sitelib}/vamos/Model_test.py
chmod 0755 %{buildroot}%{python_sitelib}/vamos/busyfix/basic_test.py
chmod 0755 %{buildroot}%{python_sitelib}/vamos/rsf2model/BoolRewriter_test.py
chmod 0755 %{buildroot}%{python_sitelib}/vamos/rsf2model/RsfReader_test.py
chmod 0755 %{buildroot}%{python_sitelib}/vamos/vampyr/Coverage_test.py
chmod 0755 %{buildroot}%{python_sitelib}/vamos/vampyr/Message_test.py
chmod 0755 %{buildroot}%{python_sitelib}/vamos/vampyr/utils.py
# Help the debuginfo generator
mkdir -p ../libpuma-1.2/aspectc++/Puma/gen-release
pushd ../libpuma-1.2/aspectc++/Puma/gen-release
mkdir -p step1/aspects
ln -s %{_includedir}/Puma step1/aspects/Puma
mkdir -p step1/inc
ln -s %{_includedir}/Puma step1/inc/Puma
mkdir -p step2/aspects
ln -s %{_includedir}/Puma step2/aspects/Puma
popd
ln -s BoolExpLP/BoolExpLexer.l undertaker/BoolExpLexer.l
ln -s BoolExpLP/BoolExpLexer.cpp_shipped undertaker/BoolExpLexer.cpp_shipped
ln -s BoolExpLP/BoolExpParser.y undertaker/BoolExpParser.y
ln -s BoolExpLP/BoolExpParser.cpp_shipped undertaker/BoolExpParser.cpp_shipped
# Copy the Emacs support to the appropriate XEmacs dir and byte compile
mkdir -p %{buildroot}%{_xemacs_sitelispdir}
cp -a %{buildroot}%{_emacs_sitelispdir}/%{name} \
%{buildroot}%{_xemacs_sitelispdir}
cd %{buildroot}%{_xemacs_sitelispdir}/%{name}
%{_xemacs_bytecompile} *.el
# Byte compile the Emacs support file
cd %{buildroot}%{_emacs_sitelispdir}/%{name}
%{_emacs_bytecompile} *.el
%files
%doc AUTHORS README
%license LICENSE
%{_bindir}/*
%{_sbindir}/%{name}-traceutil
%{_libdir}/undertaker
%{_mandir}/man1/*
%dir %{_sysconfdir}/%{name}/
%config(noreplace) %{_sysconfdir}/%{name}/blacklist*
%config(noreplace) %{_sysconfdir}/%{name}/whitelist*
%config(noreplace) %{_sysconfdir}/%{name}/undertaker.ignore
%{python_sitelib}/vamos*
%files emacs
%dir %{_emacs_sitelispdir}/%{name}
%{_emacs_sitelispdir}/%{name}/*.elc
%files emacs-el
%{_emacs_sitelispdir}/%{name}/*.el
%files xemacs
%dir %{_xemacs_sitelispdir}/%{name}
%{_xemacs_sitelispdir}/%{name}/*.elc
%files xemacs-el
%{_xemacs_sitelispdir}/%{name}/*.el
%changelog
* Thu Dec 11 2014 Jerry James <loganjerry@gmail.com> - 1.6.1-1
- New upstream version
* Fri Nov 7 2014 Jerry James <loganjerry@gmail.com> - 1.6-2
- Avoid a conflict with the satyr package
* Thu Oct 23 2014 Jerry James <loganjerry@gmail.com> - 1.6-1
- New upstream version
- Drop upstreamed -boost_mt patch
- Build with -D_FILE_OFFSET_BITS=64
- Fix license handling
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.2-12
- Rebuild for boost 1.55.0
* Wed Jul 31 2013 Jerry James <loganjerry@gmail.com> - 1.2-11
- Add -picosat patch to adapt to new reentrant picosat API
* Sat Jul 27 2013 Petr Machata <pmachata@redhat.com> - 1.2-10
- Rebuild for boost 1.54.0
- Boost.Wave and Boost.System DSO's do not include -mt suffix anymore
(undertaker-boost_mt.patch).
* Sat Feb 09 2013 Denis Arnaud <denis.arnaud_fedora@m4x.org> - 1.2-9
- Rebuild for Boost-1.53.0
* Mon Aug 20 2012 Jerry James <loganjerry@gmail.com> - 1.2-8
- Rebuild for new picosat
* Mon Aug 6 2012 Jerry James <loganjerry@gmail.com> - 1.2-7
- Rebuild for boost 1.50
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-5
- Rebuilt for c++ ABI breakage
* Tue Jan 10 2012 Jerry James <loganjerry@gmail.com> - 1.2-4
- Rebuild to fix python dependencies
- Drop unnecessary BRs
- Ensure correct LDFLAGS
* Mon Jan 9 2012 Jerry James <loganjerry@gmail.com> - 1.2-3
- Rebuild for GCC 4.7
* Sun Nov 20 2011 Jerry James <loganjerry@gmail.com> - 1.2-2
- Rebuild for new boost
* Tue Sep 20 2011 Jerry James <loganjerry@gmail.com> - 1.2-1
- Initial RPM