Blob Blame History Raw
%global         gituser         martijnvanbrummelen
%global         gitname         nwipe
%global         commit          d01b00b4f82ea1899eee1f0ffb47ebc6ac7e5dc2
%global         shortcommit     %(c=%{commit}; echo ${c:0:7})


Name:           nwipe
Version:        0.18
Release:        1%{?dist}
Summary:        Securely erase disks using a variety of recognized methods

Group:          Applications/System
License:        GPLv2
URL:            http://nwipe.sourceforge.net
#Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source0:        https://github.com/%{gituser}/%{gitname}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz

#Fix issue with mersene twister generating only random half-words on 64bit architecture
#Reported upstream - https://github.com/martijnvanbrummelen/nwipe/issues/7
Patch0:         nwipe-twister_64bit.patch
Patch1:         nwipe-epel6.patch
#Build fails due to off64_t missing on Fedora <= 23
#Reported upstream - https://github.com/martijnvanbrummelen/nwipe/issues/19
Patch2:         nwipe-0.18-fedora.patch

BuildRequires:  parted-devel
BuildRequires:  ncurses-devel
BuildRequires:  autoconf
BuildRequires:  automake

#For compatibility with EPEL5
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)


%description
The nwipe is a command that will securely erase disks using a variety of 
recognized methods. It is a fork of the dwipe command used by Darik's 
Boot and Nuke (dban). Nwipe was created out of need to run the DBAN dwipe
command outside of DBAN. This allows it to use any host distribution which
gives better hardware support. It is essentially the same as dwipe, with 
a few changes:
- pthreads is used instead of fork
- The parted library is used to detect drives
- The code is designed to be compiled with gcc 

%prep
%setup -qn %{gitname}-%{commit}
%patch0 -p 1 -b .64bit
%patch1 -p 1 -b .epel6
%patch2 -p 1 -b .fedora


%build
autoreconf -vif
%configure
make %{?_smp_mflags}


%install
#Cleanup the buildroot for compatibility with EPEL5
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} LDFLAGS="-lncurses -lpanel"


%clean
#Cleanup the buildroot for compatibility with EPEL5
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc COPYING README
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.gz

%changelog
* Mon Aug 01 2016 Michal Ambroz <rebus at, seznam.cz> 0.18-1
- bump to 0.18

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.17-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Jun 22 2015 Michal Ambroz <rebus at, seznam.cz> 0.17-3
- fix build on epel6

* Mon Jun 22 2015 Michal Ambroz <rebus at, seznam.cz> 0.17-2
- patch to fix the randr mersene twister on 64bit platform (bug id 1151036)

* Mon Jun 22 2015 Michal Ambroz <rebus at, seznam.cz> 0.17-1
- upgrade to version 0.17, switch to github repository

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Feb 16 2013 Michal Ambroz <rebus at, seznam.cz> 0.14-2
- removed build requirement to autoconf again

* Sat Feb 16 2013 Michal Ambroz <rebus at, seznam.cz> 0.14-1
- upgrade to version 0.14

* Sun Feb 10 2013 Michal Ambroz <rebus at, seznam.cz> 0.13-2
- patched build to check for ncurses independently from panel

* Sun Feb 10 2013 Michal Ambroz <rebus at, seznam.cz> 0.13-1
- upgrade to version 0.13

* Tue Feb 05 2013 Michal Ambroz <rebus at, seznam.cz> 0.12-1
- upgrade to version 0.12

* Mon Sep 24 2012 Michal Ambroz <rebus at, seznam.cz> 0.11-1
- upgrade to version 0.11

* Fri Aug 10 2012 Michal Ambroz <rebus at, seznam.cz> 0.10-1
- upgrade to version 0.10

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.08-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sun Apr 08 2012 Michal Ambroz <rebus at, seznam.cz> 0.08-1
- upgrade to version 0.08

* Thu Mar 15 2012 Rex Dieter <rdieter@fedoraproject.org> 0.06-3
- rebuild (parted)

* Fri Jan 06 2012 Michal Ambroz <rebus at, seznam.cz> 0.06-2
- redownload of upstream package - original release of 0.06 contained binaries

* Thu Jan 05 2012 Michal Ambroz <rebus at, seznam.cz> 0.06-1
- added Group field
- FSF address and manpage was fixed upstream
- bump to new version 0.06

* Sun Jan 01 2012 Michal Ambroz <rebus at, seznam.cz> 0.05-3
- added clean stage for EPEL5 compatibility

* Sun Jan 01 2012 Michal Ambroz <rebus at, seznam.cz> 0.05-2
- fixed defattr based on package review from Ivan Romanov

* Wed Dec 28 2011 Michal Ambroz <rebus at, seznam.cz> 0.05-1
- initial build for Fedora