Blob Blame History Raw
# No debugging info because the built .exe is bytecode. Re-enable
# if we get AOT working.
%global debug_package %{nil}

Name:           rescene
Version:        1.2
Release:        4%{?dist}
Summary:        Extracts RAR metadata and recreates RAR files
Group:          Applications/Archiving
License:        MIT
URL:            http://rescene.info/
Source0:        http://rescene.info/srr.%{version}.cs.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  mono-core
Requires:       mono-core
ExclusiveArch:  %{mono_arches}

%description
ReScene is a mechanism for backing up and restoring the metadata from
RAR archives.


%prep
%setup -q -c
cat >rescene.shell_script <<EOS
#!/bin/sh

mono "%{_libdir}/%{name}/srr.exe" "\$@"
EOS

# Fix EOL encodings
sed -i -e "s|\r||" license.txt



%build
gmcs -unsafe -out:srr.exe *.cs

# Enabling AOT compilation causes rpmbuild to fail generating debuginfo.
# Disable it for now.
#mono --aot -O=all rescene.exe


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}

install -m 755 srr.exe $RPM_BUILD_ROOT%{_libdir}/%{name}/
# Enabling AOT compilation causes rpmbuild to fail generating debuginfo.
# Disable it for now.
#install -m 755 rescene.exe.so $RPM_BUILD_ROOT%%{_libdir}/%%{name}/
install -m 755 rescene.shell_script $RPM_BUILD_ROOT%{_bindir}/srr


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc license.txt
%{_libdir}/%{name}
%{_bindir}/srr


%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Jul 20 2011 Dan HorĂ¡k <dan[at]danny.cz> - 1.2-3
- updated the supported arch list

* Thu Aug 26 2010 Conrad Meyer <konrad@tylerc.org> - 1.2-2
- Change to upstream binary name, "srr".
- Escape commented RPM macros so we don't get surprise expansions.

* Tue Aug 24 2010 Conrad Meyer <konrad@tylerc.org> - 1.2-1
- Bump to 1.2.
- Added support for archives with Unicode (actually UTF-8) encoded file
  names.
- Fixed a bug that caused errors when reconstructing archives with extra
  data (or padding) in their File Blocks. Specifically, if an archive
  contains a file that has a packed size larger than its original size
  (something that shouldn't ever happen with m0 compression), older
  versions of ReScene would repeat the last valid buffer of data to fill
  the difference, resulting in CRC (and SFV) errors on the last
  reconstructed file. This build fills the difference with null bytes
  instead and does not include the extra data in the CRC calculation.
  Note that although this change seems to have fixed all known issues
  with such archives, since there's no reason for the situation to occur
  in the first place, there's no guarantee this fix will handle all such
  archives in future.

* Mon Apr 26 2010 Conrad Meyer <konrad@tylerc.org> - 1.1-1
- Bump version, changelog:
  - Added -r switch to enable support for auto-locating renamed files. When
    this switch is used, if a file needed for reconstruction cannot be located
    in the input directory, the program will look for another file with the
    same extension and file size and attempt to use it instead.
  - Added archived file list to the output when using the -l switch.
  - Fixed a bug that caused an error when reconstructing a release that had
    directory structure preserved in the RAR archive. Now no attempt is made to
    open directories or 0-byte files during reconstruction since no data would
    be needed from them anyway.

* Mon Dec 14 2009 Conrad Meyer <konrad@tylerc.org> - 1.0-3
- Update license (clarified with upstream, again).

* Thu Dec 3 2009 Conrad Meyer <konrad@tylerc.org> - 1.0-2
- Update license (clarified with upstream).

* Wed Dec 2 2009 Conrad Meyer <konrad@tylerc.org> - 1.0-1
- Initial package.