From 18deb277e0358143ddeed38fd5306677faa61edd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Jan 07 2013 18:48:45 +0000 Subject: Initial import --- diff --git a/.gitignore b/.gitignore index e69de29..6f5bb4c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/libforensic1394-0.2.tar.gz diff --git a/libforensic1394-0.2-cmake.patch b/libforensic1394-0.2-cmake.patch new file mode 100644 index 0000000..9cd98f9 --- /dev/null +++ b/libforensic1394-0.2-cmake.patch @@ -0,0 +1,15 @@ +--- libforensic1394-0.2/CMakeLists.txt 2010-09-18 23:18:54.000000000 +0200 ++++ libforensic1394-0.2/CMakeLists.txt.new 2012-09-25 23:03:21.347593648 +0200 +@@ -100,9 +100,9 @@ + ENDIF() + + INSTALL(TARGETS ${FORENSIC1394_INSTALL_TARGETS} +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + INSTALL(FILES src/forensic1394.h DESTINATION include) + + # Documentation diff --git a/libforensic1394.spec b/libforensic1394.spec new file mode 100644 index 0000000..27ffbb0 --- /dev/null +++ b/libforensic1394.spec @@ -0,0 +1,138 @@ +%global s_name forensic1394 +%global with_python3 1 + +Name: libforensic1394 +Version: 0.2 +Release: 3%{?dist} +Summary: A library for performing live memory forensics over firewire + +Group: System Environment/Libraries +License: LGPLv3+ +URL: https://freddie.witherden.org/tools/libforensic1394/ +Source0: https://freddie.witherden.org/tools/%{name}/releases/%{name}-%{version}.tar.gz +Patch0: libforensic1394-0.2-cmake.patch + +BuildRequires: cmake +BuildRequires: doxygen + +%description +An library for performing live memory forensics over the IEEE 1394 (FireWire) +interface. libforensic1394 improves upon existing libraries by providing a +simple and clean interface to the the direct memory access functionality +available over FireWire. + +%package devel +Summary: Headers for developing programs that will use %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the header files needed for developing +%{name} applications. + +%package -n python2-%{s_name} +Summary: Python bindings for %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: python2-devel + +%description -n python2-%{s_name} +This package contains the python bindings for %{name}. + +%if 0%{?with_python3} +%package -n python3-%{s_name} +Summary: Python bindings for %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: python3-devel + +%description -n python3-%{s_name} +This package contains the python 3 bindings for %{name}. +%endif # if with_python3 + +%prep +%setup -q +%patch0 -p1 -b .path + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a python %{py3dir} +%endif # if with_python3 + +%build +mkdir -p build +pushd build +%cmake -G"Unix Makefiles" \ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ + -DFORENSIC1394_BUILD_STATIC:BOOL=OFF .. +make %{?_smp_mflags} +popd + +# Python 2 bindings +pushd python +%{__python2} setup.py build +popd + +%if 0%{?with_python3} +# Python 3 bindings +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # if with_python3 + +# Docs +doxygen docs/Doxyfile + +%install +pushd build +make install DESTDIR=%{buildroot} INSTALL="install -p" +find %{buildroot} -name '*.la' -exec rm -f {} ';' +popd + +# Python 2 bindings +pushd python +%{__python2} setup.py install --root %{buildroot} +popd + +%if 0%{?with_python3} +# Python 3 bindings +pushd %{py3dir} +%{__python3} setup.py install --root %{buildroot} +popd +%endif # if with_python3 + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%doc AUTHORS COPYING COPYING.LESSER README +%{_libdir}/%{name}.so.* + +%files devel +%doc COPYING COPYING.LESSER docs/html +%{_includedir}/%{s_name}.h +%{_libdir}/%{name}.so + +%files -n python2-%{s_name} +%{python2_sitelib}/%{s_name}/ +%{python2_sitelib}/*.egg-info + +%if 0%{?with_python3} +%files -n python3-%{s_name} +%{python3_sitelib}/%{s_name}/ +%{python3_sitelib}/*.egg-info +%endif # with_python3 + +%changelog +* Sat Jan 05 2013 Fabian Affolter - 0.2-3 +- Integrated patch from Eduardo Echeverria + +* Mon Dec 10 2012 Fabian Affolter - 0.2-2 +- python2 package added +- -devel subpackage requires: fixed +- License files from the subpackages removed +- python 3 subpackage renamed +- Docs generation changed + +* Mon Apr 16 2012 Fabian Affolter - 0.2-1 +- Initial package for Fedora diff --git a/sources b/sources index e69de29..63e69bd 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +faea8bb6d71a64f071a92f4ad1b632fb libforensic1394-0.2.tar.gz