Solaris/SUNWjpg.spec
author dc144907
Fri, 17 Feb 2006 19:10:21 +0000
changeset 6787 118ff359f15e
parent 6102 1e3e35b9a369
child 7020 a2cfb0a90f25
permissions -rw-r--r--
2006-02-17 Damien Carbery <[email protected]> * SUNWflac.spec, SUNWfontconfig.spec, SUNWfsexam.spec, SUNWgnome-a11y-base-libs.spec, SUNWjpg.spec, SUNWpng.spec, SUNWxwxft.spec, SUNWuttscwrap.spec, SUNWspeex.spec, SUNWopensp.spec, SUNWopenjade.spec, SUNWogg-vorbis.spec SUNWlxsl.spec, SUNWlxml.spec, SUNWliboil.spec, SUNWlibexif.spec SUNWgnome-wm.spec: Update Build/Requires after running check-deps.pl script.

#
# spec file for package SUNWjpg
#
# includes module(s): jpeg
#
# Copyright (c) 2004 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

%include Solaris.inc

%define jpeg_version 6b

Name:                    SUNWjpg
Summary:                 jpeg - The Independent JPEG Groups JPEG software
Version:                 20.%{default_pkg_version}
Source:                  http://www.ijg.org/files/jpegsrc.v%{jpeg_version}.tar.gz
Source1:                 cjpeg.1
Source2:                 djpeg.1
Source3:                 jpegtran.1
Source4:                 rdjpgcom.1
Source5:                 wrjpgcom.1
Source6:                 libjpeg.3
Source7:                 l10n-configure.sh
SUNW_BaseDir:            %{_prefix}
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc

%package devel
Summary:                 jpeg - The Independent JPEG Groups JPEG software - development files
SUNW_BaseDir:            %{_prefix}
%include default-depend.inc

%package devel-share
Summary:                 jpeg - The Independent JPEG Groups JPEG software - development files - /usr/share
SUNW_BaseDir:            %{_prefix}
%include default-depend.inc

%package -n SUNWjpgS
Summary:                 jpeg - The Independent JPEG Groups JPEG software (Source)
SUNW_BaseDir:            %{_prefix}
Requires: SUNWcsr

%prep
%setup -c -n %name-%version
cd jpeg-%{jpeg_version}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/src/jpeg
tar cf - . | bash -c "cd $RPM_BUILD_ROOT%{_datadir}/src/jpeg; tar xf -"

%ifarch amd64 sparcv9
cd ..
mv jpeg-%{jpeg_version} jpeg-%{jpeg_version}-64
gzcat %SOURCE0 | tar xf -
cd jpeg-%{jpeg_version}
%endif

bash -x %SOURCE7

%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
    CPUS=1
fi
export CFLAGS="$RPM_OPT_FLAGS"
cd jpeg-%{jpeg_version}
./configure --enable-shared --prefix=%{_prefix} --exec-prefix=%{_prefix}
sed -e "s%%^CC=\"/.*\"%%CC=\"$CC\"%%" `which libtool` > libtool
chmod a+x libtool
make -j$CPUS

%ifarch amd64 sparcv9
cd ../jpeg-%{jpeg_version}-64
export CFLAGS="%optflags64"
export LDFLAGS="%_ldflags %optflags64"
export LD_RUN_PATH=%{_prefix}/lib/%{_arch64}
export CC=${CC64:-$CC}
ccdir=`dirname $CC`
export PATH=$ccdir:$PATH
./configure --enable-shared --prefix=%{_prefix} --exec-prefix=%{_prefix}
sed -e "s%%^CC=\"/.*\"%%CC=\"$CC\"%%" `which libtool` > libtool
chmod a+x libtool
make -j$CPUS
%endif

%install
cd jpeg-%{jpeg_version}
mkdir -p $RPM_BUILD_ROOT/dummy
mkdir -p $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_includedir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
make install mandir=$RPM_BUILD_ROOT%{_mandir}/man1 bindir=$RPM_BUILD_ROOT%{_bindir} includedir=$RPM_BUILD_ROOT%{_includedir} libdir=$RPM_BUILD_ROOT%{_libdir}

%ifarch amd64 sparcv9
cd ../jpeg-%{jpeg_version}-64
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{_arch64}
make install bindir=$RPM_BUILD_ROOT/dummy includedir=$RPM_BUILD_ROOT/dummy mandir=$RPM_BUILD_ROOT/dummy libdir=$RPM_BUILD_ROOT%{_libdir}/%{_arch64}
rm -f $RPM_BUILD_ROOT%{_libdir}/%{_arch64}/lib*a
%endif

rm -rf $RPM_BUILD_ROOT%{_mandir}
install -d $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0644 %SOURCE1 $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0644 %SOURCE2 $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0644 %SOURCE3 $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0644 %SOURCE4 $RPM_BUILD_ROOT%{_mandir}/sman1
install --mode=0644 %SOURCE5 $RPM_BUILD_ROOT%{_mandir}/sman1
install -d $RPM_BUILD_ROOT%{_mandir}/sman3
install --mode=0644 %SOURCE6 $RPM_BUILD_ROOT%{_mandir}/sman3

rm -f $RPM_BUILD_ROOT%{_libdir}/lib*a
rm -rf $RPM_BUILD_ROOT/dummy

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-, root, other)
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/lib*.so*
%ifarch amd64 sparcv9
%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
%{_libdir}/%{_arch64}/lib*.so*
%endif
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/sman1
%{_mandir}/sman1/*

%files devel
%defattr (-, root, other)
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*

%files devel-share
%defattr (-, root, other)
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/sman3
%{_mandir}/sman3/*

%files -n SUNWjpgS
%defattr (-, root, other)
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, sys) %{_datadir}/src
%{_datadir}/src/*

%changelog
* Fri Feb 17 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Fri Sep 02 2005 - [email protected]
- remove unpackaged files
* Fri Oct 29 2004 - [email protected]
- use $CC64 as the 64-bit C compiler, if defined
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Sat Oct  2 2004 - [email protected]
- Create 64bit libraries for Solaris
* Mon Aug 30 2004 - [email protected]
- Bug 5091588 : Include files and man3 files should be in separate devel package
* Thu Aug 12 2004 - [email protected]
- Updated Version to be 2.6.0 since delivering w/ G2.6
* Sun Feb 23 2004 - [email protected]
- initial version added to CVS