William Cohen b93756
%define version 7.99
William Cohen b93756
William Cohen b93756
Summary: An API for Run-time Code Generation
William Cohen b93756
License: LGPLv2+
William Cohen b93756
Name: dyninst
William Cohen b93756
Group: Development/Libraries
William Cohen 09d6a6
Release: 0.19%{?dist}
William Cohen b93756
URL: http://www.dyninst.org
William Cohen b93756
Version: %version
William Cohen b93756
Exclusiveos: linux
William Cohen b93756
#Right now dyninst does not know about the following architectures
William Cohen b93756
ExcludeArch: s390 s390x %{arm}
William Cohen b93756
William Cohen b93756
# The source for this package was pulled from upstream's vcs.  Use the
William Cohen b93756
# following commands to generate the tarball:
William Cohen b93756
#  git clone http://git.dyninst.org/dyninst.git; cd dyninst
William Cohen 221ead
#  git archive --format=tar.gz --prefix=dyninst/ 96826d0b7cbec7deb1398019ecadea5cf756c9c7 >  dyninst-7.99.tar.gz
William Cohen b93756
#  git clone http://git.dyninst.org/docs.git; cd docs
William Cohen b93756
#  git archive --format=tar.gz fe92e5b28804791ecadc893e469bc2215dbc3066 > dyninst-docs-7.99.tar.gz
William Cohen b93756
Source0: %{name}-%{version}.tar.gz
William Cohen b93756
Source1: %{name}-docs-%{version}.tar.gz
William Cohen b93756
# Change version number so official dyninst 8.0 will replace it
William Cohen b93756
Patch3: dyninst-git.patch
William Cohen 221ead
Patch5: dyninst-unused_vars.patch
William Cohen 221ead
Patch6: dyninst-delete_array.patch
William Cohen 09d6a6
Patch7: dyninst-common-makefile.patch
William Cohen b93756
BuildRequires: libxml2-devel >= 2.7.8
William Cohen b93756
BuildRequires: libdwarf-devel 
William Cohen b93756
BuildRequires: elfutils-libelf-devel
William Cohen b93756
BuildRequires: boost-devel
William Cohen b93756
William Cohen b93756
%description
William Cohen b93756
William Cohen b93756
Dyninst is an Application Program Interface (API) to permit the insertion of
William Cohen b93756
code into a running program. The API also permits changing or removing
William Cohen b93756
subroutine calls from the application program. Run-time code changes are
William Cohen b93756
useful to support a variety of applications including debugging, performance
William Cohen b93756
monitoring, and to support composing applications out of existing packages.
William Cohen b93756
The goal of this API is to provide a machine independent interface to permit
William Cohen b93756
the creation of tools and applications that use run-time code patching.
William Cohen b93756
William Cohen b93756
%package devel
William Cohen b93756
Summary: Header files for the compiling programs with Dyninst
William Cohen b93756
Group: Development/System
William Cohen b93756
Requires: dyninst = %{version}-%{release}
William Cohen b93756
%description devel
William Cohen b93756
Dyninst-devel includes the C header files that specify the Dyninst user-space
William Cohen b93756
libraries and interfaces. This is required for rebuilding any program
William Cohen b93756
that uses Dyninst.
William Cohen b93756
William Cohen b93756
%package static
William Cohen b93756
Summary: Static libraries for the compiling programs with Dyninst
William Cohen b93756
Group: Development/System
William Cohen b93756
Requires: dyninst = %{version}-%{release}
William Cohen b93756
%description static
William Cohen b93756
dyninst-static includes the static versions of the library files for
William Cohen b93756
the dyninst user-space libraries and interfaces.
William Cohen b93756
William Cohen b93756
%prep
William Cohen b93756
%setup -q -n %{name}-%{version} -c
William Cohen b93756
%setup -q -T -D -a 1
William Cohen b93756
William Cohen b93756
%patch3 -p1 -b .git
William Cohen 221ead
William Cohen 221ead
pushd dyninst
William Cohen 221ead
%patch5 -p1 -b .unused
William Cohen 221ead
%patch6 -p1 -b .delete
William Cohen 09d6a6
%patch7 -p1 -b .common
William Cohen 221ead
popd
William Cohen b93756
William Cohen b93756
%build
William Cohen b93756
William Cohen b93756
cd dyninst
William Cohen b93756
William Cohen b93756
%configure
William Cohen b93756
make \
William Cohen b93756
  DONT_BUILD_NEWTESTSUITE=1 \
William Cohen b93756
  all StackwalkerAPI
William Cohen b93756
William Cohen b93756
%install
William Cohen b93756
William Cohen b93756
cd dyninst
William Cohen b93756
make \
William Cohen b93756
  LIBRARY_DEST=%{buildroot}/%{_libdir}/dyninst \
William Cohen b93756
  PROGRAM_DEST=%{buildroot}/usr/bin \
William Cohen b93756
  INCLUDE_DEST=%{buildroot}/usr/include/dyninst \
William Cohen b93756
  DONT_BUILD_NEWTESTSUITE=1 \
William Cohen b93756
  install
William Cohen b93756
William Cohen b93756
mkdir -p %{buildroot}/etc/ld.so.conf.d
William Cohen b93756
echo "%{_libdir}/dyninst" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
William Cohen b93756
William Cohen b93756
# Ugly hack to fix permissions
William Cohen b93756
chmod 644 %{buildroot}%{_includedir}/dyninst/*
William Cohen b93756
chmod 644 %{buildroot}%{_libdir}/dyninst/*.a
William Cohen b93756
William Cohen b93756
%post -p /sbin/ldconfig
William Cohen b93756
%postun -p /sbin/ldconfig
William Cohen b93756
William Cohen b93756
%files
William Cohen b93756
%defattr(-,root,root,-)
William Cohen b93756
William Cohen b93756
# FIXME parseThat is not part of normal build
William Cohen b93756
#%{_bindir}/parseThat
William Cohen b93756
%{_libdir}/dyninst/*.so.*
William Cohen b93756
William Cohen b93756
# The README also contains the license information
William Cohen b93756
#%doc LICENSE
William Cohen b93756
%doc dyninst/dyninstAPI/README
William Cohen b93756
William Cohen b93756
%doc depGraphAPI.pdf
William Cohen b93756
%doc dynC_API.pdf
William Cohen b93756
%doc dyninstProgGuide.pdf
William Cohen b93756
%doc symtabAPI/symtabProgGuide.pdf
William Cohen b93756
%doc instructionProgGuide.pdf
William Cohen b93756
%doc parseapi.pdf
William Cohen b93756
%doc ProcControlAPI.pdf
William Cohen b93756
%doc stackwalk/stackwalker.pdf
William Cohen b93756
%doc dynC_API.pdf
William Cohen b93756
William Cohen b93756
%config(noreplace) /etc/ld.so.conf.d/*
William Cohen b93756
William Cohen b93756
%files devel
William Cohen b93756
%defattr(-,root,root,-)
William Cohen b93756
%{_includedir}/dyninst
William Cohen b93756
%{_libdir}/dyninst/*.so
William Cohen b93756
William Cohen b93756
%files static
William Cohen b93756
%defattr(-,root,root,-)
William Cohen b93756
%{_libdir}/dyninst/*.a
William Cohen b93756
William Cohen b93756
%changelog
William Cohen 09d6a6
* Mon Jul 16 2012 William Cohen <wcohen@redhat.com> - 7.99-0.19
William Cohen 09d6a6
- Patch common/i386-unknown-linux2.4/Makefile to build.
William Cohen 09d6a6
William Cohen 221ead
* Fri Jul 13 2012 William Cohen <wcohen@redhat.com> - 7.99-0.18
William Cohen 221ead
- Rebase on newer git tree the has a number of merges into it.
William Cohen 221ead
- Adjust spec file to allow direct use of git patches
William Cohen 221ead
- Fix to eliminate unused varables.
William Cohen 221ead
- Proper delete for array.
William Cohen 221ead
William Cohen 3ed909
* Thu Jun 28 2012 William Cohen <wcohen@redhat.com> - 7.99-0.17
William Cohen 3ed909
- Rebase on newer git repo.
William Cohen 3ed909
William Cohen 24518d
* Thu Jun 28 2012 William Cohen <wcohen@redhat.com> - 7.99-0.16
William Cohen 24518d
- Eliminate dynptr.h file use with rebase on newer git repo.
William Cohen 24518d
William Cohen 4f1375
* Mon Jun 25 2012 William Cohen <wcohen@redhat.com> - 7.99-0.14
William Cohen 4f1375
- Rebase on newer git repo.
William Cohen 4f1375
William Cohen b93756
* Tue Jun 19 2012 William Cohen <wcohen@redhat.com> - 7.99-0.12
William Cohen b93756
- Fix static library and header file permissions.
William Cohen b93756
- Use sources from the dyninst git repositories.
William Cohen b93756
- Fix 32-bit library versioning for libdyninstAPI_RT_m32.so.
William Cohen b93756
William Cohen b93756
* Wed Jun 13 2012 William Cohen <wcohen@redhat.com> - 7.99-0.11
William Cohen b93756
- Fix library versioning.
William Cohen b93756
- Move .so links to dyninst-devel.
William Cohen b93756
- Remove unneded clean section.
William Cohen b93756
William Cohen b93756
* Fri May 11 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.9
William Cohen b93756
- Clean up Makefile rules.
William Cohen b93756
William Cohen b93756
* Wed May 5 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.8
William Cohen b93756
- Clean up spec file.
William Cohen b93756
William Cohen b93756
* Wed May 2 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.7
William Cohen b93756
- Use "make install" and do staged build.
William Cohen b93756
- Use rpm configure macro.
William Cohen b93756
William Cohen b93756
* Thu Mar 15 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.5
William Cohen b93756
- Nuke the bundled boost files and use the boost-devel rpm instead.
William Cohen b93756
William Cohen b93756
* Mon Mar 12 2012 William Cohen <wcohen@redhat.com> - 7.0.1-0.4
William Cohen b93756
- Initial submission of dyninst spec file.