diff --git a/.gitignore b/.gitignore index e69de29..515e71f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ssdeep-2.10.tar.gz diff --git a/sources b/sources index e69de29..b688fab 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +8f65e2c555b61b9209c0854fc7f2731b ssdeep-2.10.tar.gz diff --git a/ssdeep-2.10-build.patch b/ssdeep-2.10-build.patch new file mode 100644 index 0000000..6c2aaee --- /dev/null +++ b/ssdeep-2.10-build.patch @@ -0,0 +1,40 @@ +diff -up ssdeep-2.10/configure.ac.old ssdeep-2.10/configure.ac +--- ssdeep-2.10/configure.ac.old 2014-01-22 11:39:10.000000000 +0100 ++++ ssdeep-2.10/configure.ac 2014-01-22 11:40:35.000000000 +0100 +@@ -21,16 +21,6 @@ case $host in + esac + + +-# Bring additional directories where things might be found into our +-# search path. I don't know why autoconf doesn't do this by default +-for spfx in /usr/local /opt/local /sw ; do +- echo checking ${spfx}/include +- if test -d ${spfx}/include; then +- CPPFLAGS="-I${spfx}/include $CPPFLAGS" +- LDFLAGS="-L${spfx}/lib $LDFLAGS" +- fi +-done +- + AC_C_BIGENDIAN + AC_SYS_LARGEFILE + +diff -up ssdeep-2.10/configure.old ssdeep-2.10/configure +--- ssdeep-2.10/configure.old 2014-01-22 11:39:00.000000000 +0100 ++++ ssdeep-2.10/configure 2014-01-22 11:40:21.000000000 +0100 +@@ -15462,16 +15462,6 @@ $as_echo "#define __LINUX__ 1" >>confdef + esac + + +-# Bring additional directories where things might be found into our +-# search path. I don't know why autoconf doesn't do this by default +-for spfx in /usr/local /opt/local /sw ; do +- echo checking ${spfx}/include +- if test -d ${spfx}/include; then +- CPPFLAGS="-I${spfx}/include $CPPFLAGS" +- LDFLAGS="-L${spfx}/lib $LDFLAGS" +- fi +-done +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 + $as_echo_n "checking whether byte ordering is bigendian... " >&6; } + if ${ac_cv_c_bigendian+:} false; then : diff --git a/ssdeep.spec b/ssdeep.spec new file mode 100644 index 0000000..2f42db6 --- /dev/null +++ b/ssdeep.spec @@ -0,0 +1,110 @@ +# spec file for ssdeep +# +# Copyright (c) 2014 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/3.0/ +# +# Please, preserve the changelog entries +# + +Name: ssdeep +Version: 2.10 +Release: 2%{?dist} +Summary: Compute context triggered piecewise hashes +Group: Development/Tools + +License: GPLv2+ +URL: http://ssdeep.sourceforge.net/ +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz + +# Drop /usr/local and /opt from build path +Patch0: %{name}-2.10-build.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + + +%description +ssdeep is a program for computing context triggered piecewise hashes (CTPH). +Also called fuzzy hashes, CTPH can match inputs that have homologies. +Such inputs have sequences of identical bytes in the same order, although bytes +in between these sequences may be different in both content and length. + + +%package devel +Summary: Development files for libfuzzy +Group: Development/Libraries +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains library and header files for +developing applications that use libfuzzy. + + +%package libs +Summary: Runtime libfuzzy library +Group: System Environment/Libraries + +%description libs +The %{name}-libs package contains libraries needed by applications +that use libfuzzy. + + +%prep +%setup -q + +%patch0 -p1 -b .old +# avoid autotools being re-run +touch -r aclocal.m4 configure configure.ac + + +%build +%configure --disable-static + +# rpath removal +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 %{buildroot} +make install DESTDIR=%{buildroot} + +rm %{buildroot}%{_libdir}/libfuzzy.la + + +%clean +rm -rf %{buildroot} + + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc AUTHORS +%{_bindir}/%{name} +%{_mandir}/man1/%{name}.* + +%files devel +%defattr(-,root,root,-) +%doc FILEFORMAT NEWS README TODO +%{_includedir}/fuzzy.h +%{_libdir}/libfuzzy.so + +%files libs +%defattr(-,root,root,-) +%doc COPYING +%{_libdir}/libfuzzy.so.2* + + +%changelog +* Wed Jan 22 2014 Remi Collet - 2.10-2 +- cleanup build path (comment from review #1056460) + +* Wed Jan 22 2014 Remi Collet - 2.10-1 +- initial package \ No newline at end of file