File hercules.spec of Package hercules

#
# spec file for package hercules
#
# Copyright (c) 2015 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:           hercules
BuildRequires:  libbz2-devel
BuildRequires:  zlib-devel
Url:            http://www.hercules-390.eu/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Version:        3.11
Release:        0
Summary:        Hercules IBM Mainframe Emulator
License:        QPL-1.0
Group:          System/Emulators/Other
Source:         http://downloads.hercules-390.eu/%name-%version.tar.gz
Patch:          hercules-3.03-overflow.patch

%description
Hercules is an emulator for the IBM System/370, ESA/390, and
z/Architecture series of mainframe computers. It is capable of running
any IBM operating system and applications that a real system will run,
as long as the hardwre needed is emulated. Hercules can emulate FBA and
CKD DASD, tape, printer, card reader, card punch, channel-to-channel
adapter, and printer-keyboard and 3270 terminal devices.

Hercules information can be found on the web at
http://www.conmicro.cx/hercules .

%prep
%setup
%patch

%build
%configure \
	--enable-cckd-bzip2 \
	--enable-het-bzip2 \
	--enable-optimization="$RPM_OPT_FLAGS" \
	--enable-multi-cpu=8
make %{?jobs:-j%{jobs}}

%install
make install DESTDIR=$RPM_BUILD_ROOT

# Get rid of the pesky libtool libs; they're not good for SuSE linux.
rm -f $RPM_BUILD_ROOT/%_libdir/*.la
# ... but keep the s390 .la files, because that's the only way that they can be loaded
#### rm -f $RPM_BUILD_ROOT/%_libdir/%{name}/*.la

mkdir -p $RPM_BUILD_ROOT/etc/%{name}/
cp hercules.cnf $RPM_BUILD_ROOT/etc/%{name}/sample.cnf

%files
%defattr(-, root, root)
/usr/bin/*
%_libdir/%{name}
%_libdir/*.so
%_mandir/man1/*
%_mandir/man4/*
/usr/share/%{name}
%dir /etc/%{name}
%config /etc/%{name}/sample.cnf

%changelog
openSUSE Build Service is sponsored by