File libpng12-0.spec of Package libpng12-0

#
# spec file for package libpng12-0 (Version 1.2.39)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           libpng12-0
BuildRequires:  zlib-devel
License:        Zlib License
Group:          System/Libraries
Url:            http://www.libpng.org/pub/png/libpng.html
AutoReqProv:    on
Version:        1.2.49
Release:        1.<RELEASE1>
Summary:        Library for the Portable Network Graphics Format (PNG)
Source:         libpng-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# bug437293
%ifarch ppc64
Obsoletes:      libpng-64bit
%endif
#
Obsoletes:      libpng < %{version}
Provides:       libpng = %{version}-%{release}

%package -n libpng-devel
License:        Zlib License
Requires:       zlib-devel glibc-devel libpng12-0 = %{version}
Group:          Development/Libraries/C and C++
Summary:        Development Tools for applications which will use the Libpng
# bug437293
%ifarch ppc64
Obsoletes:      libpng-devel-64bit
%endif
#

%package -n libpng3
License:        Zlib License
Group:          System/Libraries
Summary:        Library for the Portable Network Graphics Format (PNG) - compatibility version

%description
libpng is the official reference library for the Portable Network
Graphics format (PNG).



Authors:
--------
    Andreas Dilger <adilger@enel.ucalgary.ca>

%description -n libpng-devel
The libpng-devel package includes the header files, libraries,
configuration files and development tools necessary for compiling and
linking programs which will manipulate PNG files using libpng.

libpng is the official reference library for the Portable Network
Graphics (PNG) format.



Authors:
--------
    Andreas Dilger <adilger@enel.ucalgary.ca>

%description -n libpng3
libpng is the official reference library for the Portable Network
Graphics format (PNG).



Authors:
--------
    Andreas Dilger <adilger@enel.ucalgary.ca>

%prep
%setup -n libpng-%{version}

%build
./autogen.sh
# We'll never use the old pgcc-2.95.1 with the buggy -O3, so having
# the -O3 that is originally used should work.
# Substitute the -O2 to -O3 because I'm not sure if simply appending
# it will preserve(not override) the detailed opt flags used in RPM_OPT_FLAGS:
CFLAGS="`echo $RPM_OPT_FLAGS|sed 's/-O2/-O3/'`" \
  ./configure --prefix=/usr \
	      --libdir=%{_libdir} \
              --mandir=%{_mandir} \
              --disable-static

%check
make check

%install
make install DESTDIR=$RPM_BUILD_ROOT 
rm $RPM_BUILD_ROOT/%{_libdir}/libpng*.la

%clean
rm -rf "$RPM_BUILD_ROOT"

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post -n libpng3 -p /sbin/ldconfig

%postun -n libpng3 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/libpng12.so.0*

%files -n libpng3
%defattr(-,root,root)
%{_libdir}/libpng.so.3*

%files -n libpng-devel
%defattr(-,root,root)
/usr/bin/*config
/usr/include/*
%{_libdir}/libpng*.so
%doc %{_mandir}/man3/libpng.3.gz
%doc %{_mandir}/man3/libpngpf.3.gz
%doc %{_mandir}/man5/png.5.gz
%{_libdir}/pkgconfig/*.pc
%doc CHANGES README TODO ANNOUNCE KNOWNBUG Y2KINFO  LICENSE libpng-*.txt

%changelog
openSUSE Build Service is sponsored by