File adime.spec of Package adime

#
# spec file for package adime
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           adime
Version:        2.2.1
Release:        0
Summary:        Allegro Dialogs Made Easy
License:        Zlib
Group:          Development/Libraries/C and C++
URL:            https://adime.sourceforge.net/
Source0:        https://sourceforge.net/projects/adime/files/adime/%{version}/adime-%{version}.tar.gz
Patch0:         adime-2.2.1-so-fixes.patch
BuildRequires:  allegro-devel
BuildRequires:  fdupes
BuildRequires:  texinfo

%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 -n libadime0
Summary:        Allegro Dialogs Made Easy
Group:          System/Libraries

%description -n libadime0
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/C and C++
Requires:       allegro-devel
Requires:       libadime0 = %{version}

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

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

%build
%make_build lib docs \
  CFLAGS="-fPIC -DPIC %{optflags}" \
  CFLAGS_NO_OPTIMIZE="-fPIC -DPIC %{optflags}" \
  LFLAGS=-g

%install
make install install-gzipped-man install-gzipped-info \
  SYSTEM_DIR=%{buildroot}%{_prefix} \
  SYSTEM_LIB_DIR=%{buildroot}%{_libdir} \
  SYSTEM_MAN_DIR=%{buildroot}%{_mandir} \
  SYSTEM_INFO_DIR=%{buildroot}%{_infodir}

ln -s libadime.so.0 %{buildroot}%{_libdir}/libadime.so

%fdupes %{buildroot}/%{_mandir}

%ldconfig_scriptlets -n libadime0

%files -n libadime0
%license license.txt
%doc thanks.txt changes.txt
%{_libdir}/libadime.so.0

%files devel
%doc readme.txt docs/txt/*.txt docs/rtf docs/html
%{_includedir}/adime.h
%{_includedir}/adime
%{_libdir}/libadime.so
%{_mandir}/man3/*
%{_infodir}/%{name}.info%{?ext_info}

%changelog
openSUSE Build Service is sponsored by