Name: udis86
Version: 1.7
Release: 4%{?dist}
Summary: A disassembler library for x86 and x86-64
Group: System Environment/Libraries
License: BSD
URL: http://udis86.sourceforge.net
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: yasm
%description
udis86 is a disassembler library (libudis86) for x86 and x86-64.
The primary intent is to aid binary code analysis.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
find '(' -name '*.c' -or -name '*.h' ')' -exec chmod 644 {} \;
%build
%configure --disable-static --enable-shared
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
rm -rf %{buildroot}%{_docdir}
%check
# test the libudis86 we just built. this is the only part that requires yasm
export LD_LIBRARY_PATH=$(pwd)/libudis86/.libs
make check
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_bindir}/udcli
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%doc docs/x86optable.* docs/udis86.* docs/index.html docs/ss.jpg docs/style.css
%{_includedir}/*
%{_libdir}/*.so
%changelog
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Dec 04 2009 Scott Tsai <scottt.tw@gmail.com> 1.7-3
- Actually remove commented out requires line
- Move check section after install section
- Place udcli in the main package instead of -devel
- Fix source file permissions
* Thu Dec 03 2009 Scottt Tsai <scottt.tw@gmail.com> 1.7-2
- Fix source url
- Remove commented out requires line
- Fix summary
- Move "make check" to check section
- Mark doc files instead of relying on make install
* Thu Dec 03 2009 Scott Tsai <scottt.tw@gmail.com> 1.7-1
- upstream 1.7