File adime.spec of Package adime

#
# spec file for package adime
#
# 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:           adime
Version:        2.2.1
Release:        0
Summary:        Allegro Dialogs Made Easy
License:        Zlib
Group:          System Environment/Libraries
Url:            http://adime.sourceforge.net/
Source0:        %{name}/%{name}-%{version}.tar.gz
Patch0:         adime-2.2.1-so-fixes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  allegro-devel
BuildRequires:  texinfo
%if 0%{?suse_version} > 1020
BuildRequires:  fdupes
%endif

%description
Adime is a portable add-on library for Allegro with functions for generating
Allegro dialogs in a very simple way. Its main purpose is to give as easy an
API as possible to people who want dialogs for editing many kinds of input
data.


%package devel
Summary:        Development libraries and headers for adime
Group:          Development/Libraries
Requires:       %{name} = %{version}
Requires:       allegro-devel
PreReq:         %install_info_prereq
#Requires(post): /sbin/install-info
#Requires(preun): /sbin/install-info

%description devel
The developmental files that must be installed in order to compile
applications which use adime.


%prep
%setup -q
%patch0 -p1 -z .so-fixes
./fix.sh unix
rm docs/txt/tmpfile.txt
mkdir docs/html docs/rtf

%build
make %{?_smp_mflags} lib docs \
  CFLAGS="-fPIC -DPIC $RPM_OPT_FLAGS" \
  CFLAGS_NO_OPTIMIZE="-fPIC -DPIC $RPM_OPT_FLAGS" \
  LFLAGS=-g

%install
make install install-gzipped-man install-gzipped-info \
  SYSTEM_DIR=$RPM_BUILD_ROOT/usr \
  SYSTEM_LIB_DIR=$RPM_BUILD_ROOT%{_libdir} \
  SYSTEM_MAN_DIR=$RPM_BUILD_ROOT%{_mandir} \
  SYSTEM_INFO_DIR=$RPM_BUILD_ROOT%{_infodir}
rm $RPM_BUILD_ROOT%{_infodir}/dir
ln -s libadime.so.0 $RPM_BUILD_ROOT%{_libdir}/libadime.so
%if 0%{?suse_version} > 1020
%fdupes -s $RPM_BUILD_ROOT/%_mandir
%endif

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%files
%defattr(-,root,root,-)
%doc license.txt thanks.txt changes.txt
%{_libdir}/libadime.so.0

%files devel
%defattr(-,root,root,-)
%doc readme.txt docs/txt/*.txt docs/rtf docs/html
%{_includedir}/adime.h
%{_includedir}/adime
%{_libdir}/libadime.so
%{_mandir}/man3/*
%{_infodir}/adime.info.gz

%changelog
openSUSE Build Service is sponsored by