Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 30446ba46f3c34d435634feeb000c584 > files > 3

undertaker-1.2-3.mga3.src.rpm

Name:           undertaker
Version:        1.2
Release:        %mkrel 3

Summary:        Find always-on and always-off conditional C code

Group:          Development/Other
License:        GPLv2 and GPLv3+
URL:            http://vamos.informatik.uni-erlangen.de/trac/undertaker
Source0:        http://vamos.informatik.uni-erlangen.de/files/%{name}-%{version}.tar.gz
Patch0:         undertaker-1.2-fix-link.patch

BuildRequires:  boost-devel
BuildRequires:  emacs
BuildRequires:  ncurses-devel
BuildRequires:  picosat-devel
BuildRequires:  python-devel
BuildRequires:  xemacs

# Needed for undertaker-calc-coverage
Requires:       gcc-cpp
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. 

%prep
%setup -q -n vamos-%{version}
%apply_patches

# Fix a python path
sed -i "s|^PYTHONPATH=.*|PYTHONPATH=\""%{py_purelibdir}"\"|" \
    rsf2model/undertaker-kconfigdump.in

# Fix a python dependency
sed 's|env python|python|' undertaker/undertaker-calc-coverage > foo
chmod a+x foo
touch -r undertaker/undertaker-calc-coverage foo
mv -f foo undertaker/undertaker-calc-coverage

# Use the right flags when building and linking
sed -e "s|-Wall -Wextra -O2|$RPM_OPT_FLAGS|" \
    -e "s|^LDFLAGS =.*|LDFLAGS = $RPM_OPT_FLAGS|" \
    -i undertaker/Makefile
sed -e "s|^LDXX=.*|LDXX=g++ \$(CXXFLAGS)|" \
    -e "s|^DEBUG =.*|DEBUG=|" \
    -e "s|-Wall -Wextra -O2|$RPM_OPT_FLAGS|" \
    -i ziz/Makefile

# Fix the Makefile so we don't rebuild everything when installing
sed -e "s|^all:.*|all: \$(PROGS) \$(TEMPLATED) \$(MANPAGES)|" \
    -e "s|^install: all.*|install:|" \
    -e "s|check undertaker-lcov|check install undertaker-lcov|" \
    -i Makefile

# Remove prebuilt objects
make clean
rm -f scripts/basic/docproc scripts/basic/fixdep scripts/basic/hash \
   scripts/kconfig/dumpconf undertaker/test-ConditionalBlock \
   undertaker/test-SatChecker undertaker/undertaker ziz/zizler

# Fix end-of-line encodings
for f in DeadAnalysis ElDocumentation Interactive ModelFiles Preconditions; do
  sed -i.orig 's/\r//' doc/Undertaker$f
  touch -r doc/Undertaker$f.orig doc/Undertaker$f
  rm -f doc/Undertaker$f.orig
done

%build
# FIXME: building with %%{?_smp_mflags} sometimes fails
make PREFIX=%{_prefix} LIBDIR=%{_libdir} \
  HOSTCFLAGS="${RPM_OPT_FLAGS}" HOSTCXXFLAGS="${RPM_OPT_FLAGS}" \
  HOSTLDFLAGS="${RPM_LD_FLAGS} -Wl,--as-needed"

%install
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir}

# The rsf2model script is installed in two places.  We only need one.
rm -f $RPM_BUILD_ROOT%{_bindir}/rsf2model

%files
%doc AUTHORS LICENSE README
%doc doc/UndertakerDeadAnalysis doc/UndertakerInteractive
%doc doc/UndertakerModelFiles doc/UndertakerPreconditions
%{_bindir}/*
%{_libdir}/undertaker
%{_mandir}/man1/*
%{python_sitelib}/undertaker*
%_datadir/emacs/site-lisp/undertaker/undertaker.el




%changelog

* Thu Apr 11 2013 neoclust <neoclust> 1.2-3.mga3
+ Revision: 409777
- Rebuild against new boost

* Sun Feb 03 2013 neoclust <neoclust> 1.2-2.mga3
+ Revision: 394295
- Fix requires

* Sun Feb 03 2013 neoclust <neoclust> 1.2-1.mga3
+ Revision: 394183
- Change to version 1.2
- imported package undertaker


* Tue Nov 08 2011 Bogdano Arendartchuk <bogdano@mandriva.com> 1.2-3
+ Revision: 729161
- rebuild for newer libboost

* Tue Oct 11 2011 Alexandre Lissy <alissy@mandriva.com> 1.2-2
+ Revision: 704255
- Updating to latest Undertaker 1.2

* Tue Mar 22 2011 Alexandre Lissy <alissy@mandriva.com> 1.1-1
+ Revision: 647664
- Fixing race condition on source package: the 1.1 available while I built the package wasn't the good one ;)

* Tue Mar 22 2011 Alexandre Lissy <alissy@mandriva.com> 1.1-0
+ Revision: 647553
- Updating undertaker to latest 1.1
  Dropping local patches that have been included upstream

* Thu Mar 17 2011 Funda Wang <fwang@mandriva.org> 1.0-3
+ Revision: 646034
- force filesystem v2
- rebuild

* Wed Feb 23 2011 Alexandre Lissy <alissy@mandriva.com> 1.0-2
+ Revision: 639478
- Fixing Undertaker's search path for dumpconf and rsf2model

* Mon Feb 21 2011 Alexandre Lissy <alissy@mandriva.com> 1.0-1
+ Revision: 639214
- Patching sources to add support for LIBDIR variable
- initial import of Undertaker
- Created package structure for undertaker.