Solaris/SUNWjpg.spec
author fujiwara
Mon, 08 Nov 2004 05:53:27 +0000
changeset 4468 d2ebf6f0146d
parent 4370 1d5e089dd61c
child 5518 235b0b4aa324
permissions -rw-r--r--
2004-11-08 Takao Fujiwara <[email protected]> * SUNWfsexam.spec, SUNWgnome-dtlogin-integration.spec, SUNWgnome-rmm-utils.spec, SUNWgnome-sys-suspend.spec, SUNWjpg.spec, SUNWlibpopt.spec, SUNWopenjade.spec, SUNWopensp.spec, SUNWperl-xml-parser.spec, SUNWpng.spec, SUNWPython.spec, SUNWTiff.spec : Updated to add l10n-configure.sh * extra-specs/aspell-en.spec, extra-specs/aspell.spec, extra-specs/db.spec, extra-specs/gnome-vfs-extras.spec, extra-specs/gnutls.spec, extra-specs/libart_lgpl.spec, extra-specs/libexif.spec, extra-specs/libgcrypt.spec, extra-specs/libogg.spec, extra-specs/libvorbis.spec, extra-specs/openldap2.spec, extra-specs/openssl.spec, extra-specs/pilot-link.spec, extra-specs/printman.spec : Updated to add l10n-configure.sh * build-gnome2.pl: Updated for the typo

#
# 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 _prefix /usr

%define jpeg_version 6b

Name:                    SUNWjpg
Summary:                 jpeg - The Independent JPEG Groups JPEG software
Version:                 20.2.6.0
Source:                  jpeg-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}

%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="%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/usr/lib $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/include
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/usr/lib/%{_arch64}
make install bindir=$RPM_BUILD_ROOT/dummy includedir=$RPM_BUILD_ROOT/dummy mandir=$RPM_BUILD_ROOT/dummy libdir=$RPM_BUILD_ROOT%{_libdir}/%{_arch64}
%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

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):supported" $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 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