[rats] Add missing SPEC

Christopher Meng cicku at fedoraproject.org
Thu Jul 3 06:48:45 UTC 2014


commit a2c30d17fe7262bf8ea9f278de499afb80fe20ad
Author: Christopher Meng <i at cicku.me>
Date:   Thu Jul 3 14:48:41 2014 +0800

    Add missing SPEC

 rats.spec |   53 ++++++++++++++++++++++++++++-------------------------
 1 files changed, 28 insertions(+), 25 deletions(-)
---
diff --git a/rats.spec b/rats.spec
index 2b882ab..09d36cb 100644
--- a/rats.spec
+++ b/rats.spec
@@ -1,15 +1,15 @@
 Name:           rats
-Version:        2.3
+Version:        2.4
 Release:        1%{?dist}
 Summary:        Rough Auditing Tool for Security
 License:        GPLv2
 URL:            https://code.google.com/p/rough-auditing-tool-for-security/
 Source0:        https://rough-auditing-tool-for-security.googlecode.com/files/rats-%{version}.tgz
-Patch1:         rats-2.1-build-clean.patch
-Patch2:         rats-2.1-php.patch
-Patch3:         rats-2.1-report.patch
-Patch4:         rats-2.1-lex.patch
-Patch5:         rats-2.1-gtk-vuln.patch
+Patch0:         0001-Fix-conflicting-declaration.patch
+Patch1:         0002-Fix-engine-output-and-php-extension.patch
+Patch2:         0003-Fix-report-layout.patch
+Patch3:         rats-2.4-gtk-vuln.patch
+Patch4:         rats-2.4-hash.patch
 BuildRequires:  expat-devel
 BuildRequires:  flex
 
@@ -25,33 +25,36 @@ Software" by Viega and McGraw.
 
 %prep
 %setup -q
-%patch1
-%patch2
-%patch3
-%patch4
-%patch5
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+
+# $(DESTDIR) hack.
+sed -e 's/$(BINDIR)/$(DESTDIR)$(BINDIR)/g' \
+    -e 's/ $(LIBDIR)/ $(DESTDIR)$(LIBDIR)/g' \
+    -e 's/$(MANDIR)/$(DESTDIR)$(MANDIR)/g' \
+    -e 's/ $(SHAREDIR)/ $(DESTDIR)$(SHAREDIR)/g' -i Makefile.in
 
 %build
-%configure
-make %{?_smp_mflags} lex
-make %{?_smp_mflags}
+%configure --datadir=%{_datadir}/%{name}
+%make_build lex && %make_build
 
 %install
-#make install doesn't accept DESTDIR or other ways of not installing to PREFIX.
-# So, we do the install ourselves due to so few files to install.
-mkdir -p %{buildroot}{%{_datadir}/rats,%{_bindir},%{_mandir}/man1}
-install -c rats %{buildroot}%{_bindir}
-install -c -m644 *.xml %{buildroot}%{_datadir}/rats
-install -c -m644 *.1 %{buildroot}%{_mandir}/man1
+%make_install
 
 %files
-%dir %{_datadir}/rats
-%doc README README.win32
-%attr(755,root,root) %{_bindir}/*
-%{_datadir}/rats/*
-%{_mandir}/man1/*
+%doc COPYING README
+%{_bindir}/rats
+%{_datadir}/rats
+%{_mandir}/man1/rats.1*
 
 %changelog
+* Wed Jul 02 2014 Christopher Meng <rpm at cicku.me> - 2.4-1
+- Update to 2.4
+- Many thanks to Slawomir Czarko <slawomir at ezono.com>
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1-13
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list