File upx.spec of Package upx
#
# spec file for package upx
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: upx
BuildRequires: gcc-c++
BuildRequires: libucl1-devel
BuildRequires: zlib-devel
Version: 3.08
Release: 0
Source: http://upx.sourceforge.net/download/%{name}-%{version}-src.tar.bz2
Patch0: %{name}-3.03_ia64-endianity.patch
Url: http://upx.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: The Ultimate Packer for eXecutables
License: GPL-2.0+
Group: Development/Tools/Other
%description
UPX is a free, portable, extendable, high-performance executable packer
for several different executable formats. It achieves an excellent
compression ratio and offers very fast decompression. Your executables
suffer no memory overhead or other drawbacks.
Authors:
--------
Markus F.X.J. Oberhumer <markus@oberhumer.com>
%prep
%setup -q -n %{name}-%{version}-src
%patch0
# BSD-4 clause licensed file, remove just in case bnc#753791
rm src/stub/src/i386-dos32.djgpp2-stubify.asm
%build
export UPX_UCLDIR=%{_prefix}
make -C src CXXFLAGS="$RPM_OPT_FLAGS"
make -C doc
%install
mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin $RPM_BUILD_ROOT%{_mandir}/man1
cp -a $RPM_BUILD_DIR/%{name}-%{version}-src/src/upx.out $RPM_BUILD_ROOT%{_prefix}/bin/upx
cp -a $RPM_BUILD_DIR/%{name}-%{version}-src/doc/upx.1 $RPM_BUILD_ROOT%{_mandir}/man1
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc BUGS COPYING LICENSE NEWS PROJECTS README README.SRC THANKS
%doc doc/upx.html
%doc %{_mandir}/man1/*
%{_prefix}/bin/*
%changelog