]> git.pld-linux.org Git - packages/crossmingw32-libjpeg.git/blobdiff - crossmingw32-libjpeg.spec
- use _dlldir, no strip if debug
[packages/crossmingw32-libjpeg.git] / crossmingw32-libjpeg.spec
index f5dbf39799233773d41807d18c93ac63b8776662..6ac76c55a47ca357388261a53c619f56fbe08758 100644 (file)
@@ -1,45 +1,79 @@
 %define                realname        libjpeg
 Summary:       Library for handling different jpeg files - Mingw32 cross version
 %define                realname        libjpeg
 Summary:       Library for handling different jpeg files - Mingw32 cross version
-Summary(pl):   Biblioteka do manipulacji plikami w formacie jpeg - wersja skro¶na dla Mingw32
+Summary(pl.UTF-8):     Biblioteka do manipulacji plikami w formacie jpeg - wersja skrośna dla Mingw32
 Name:          crossmingw32-%{realname}
 Version:       6b
 Name:          crossmingw32-%{realname}
 Version:       6b
-Release:       1
+Release:       5
 License:       distributable
 License:       distributable
-Group:         Libraries
+Group:         Development/Libraries
 Source0:       ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{version}.tar.gz
 # Source0-md5: dbd5f3b47ed13132f04c685d608a7547
 Patch0:                %{realname}-DESTDIR.patch
 Patch1:                %{realname}-include.patch
 Patch2:                %{realname}-c++.patch
 Source0:       ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{version}.tar.gz
 # Source0-md5: dbd5f3b47ed13132f04c685d608a7547
 Patch0:                %{realname}-DESTDIR.patch
 Patch1:                %{realname}-include.patch
 Patch2:                %{realname}-c++.patch
+Patch3:                %{name}-shared.patch
 URL:           http://www.ijg.org/
 BuildRequires: crossmingw32-gcc
 URL:           http://www.ijg.org/
 BuildRequires: crossmingw32-gcc
-BuildRequires: crossmingw32-w32api
-BuildRequires: libtool
+Requires:      crossmingw32-runtime
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                no_install_post_strip   1
 
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                no_install_post_strip   1
 
-%define                target          i386-mingw32
-%define                target_platform i386-pc-mingw32
-%define                arch            %{_prefix}/%{target}
-%define                gccarch         %{_prefix}/lib/gcc-lib/%{target}
-%define                gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
+%define                target                  i386-mingw32
+%define                target_platform         i386-pc-mingw32
+%define                arch                    %{_prefix}/%{target}
 
 
-%define                __cc            %{target}-gcc
-%define                __cxx           %{target}-g++
+%define                _sysprefix              /usr
+%define                _prefix                 %{_sysprefix}/%{target}
+%define                _dlldir                 /usr/share/wine/windows/system
+%define                __cc                    %{target}-gcc
+%define                __cxx                   %{target}-g++
+
+%ifarch alpha sparc sparc64 sparcv9
+%define                optflags        -O2
+%endif
 
 %description
 The libjpeg package contains a library of functions for manipulating
 JPEG images.
 
 
 %description
 The libjpeg package contains a library of functions for manipulating
 JPEG images.
 
-%description -l pl
-Ten pakiet zawiera bibliotekê funkcji do manipulacji plikami jpeg.
+This package contains the cross version for Win32.
+
+%description -l pl.UTF-8
+Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg.
+
+Ten pakiet zawiera wersję skrośną dla Win32.
+
+%package static
+Summary:       Static libjpeg library (cross mingw32 version)
+Summary(pl.UTF-8):     Statyczna biblioteka libjpeg (wersja skrośna mingw32)
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description static
+Static libjpeg library (cross mingw32 version).
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libjpeg (wersja skrośna mingw32).
+
+%package dll
+Summary:       libjpeg - DLL library for Windows
+Summary(pl.UTF-8):     libjpeg - biblioteka DLL dla Windows
+Group:         Applications/Emulators
+Requires:      wine
+
+%description dll
+libjpeg - DLL library for Windows.
+
+%description dll -l pl.UTF-8
+libjpeg - biblioteka DLL dla Windows.
 
 %prep
 %setup -q -n jpeg-%{version}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 
 %prep
 %setup -q -n jpeg-%{version}
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 CC=%{target}-gcc ; export CC
 
 %build
 CC=%{target}-gcc ; export CC
@@ -60,20 +94,72 @@ TARGET="%{target}" ; export TARGET
        --prefix=%{arch}
 
 %{__make}
        --prefix=%{arch}
 
 %{__make}
+%{__make} jpeg.dll
+
+cat << "EOF" >> libjpeg.la
+# libjpeg.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
+# ^^^^ This line needs to stay
+# Made by czarny czarny at pld-linux.org
+
+# The name that we can dlopen(3).
+dlname='../bin/libjpeg.dll'
+
+# Names of this library.
+library_names='libjpeg.dll.a'
+
+# The name of the static archive.
+old_library='libjpeg.a'
+
+# Libraries that this one depends upon.
+dependency_libs=''
+
+# Version information for libz.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='%{_libdir}'
+EOF
+
+%if 0%{!?debug:1}
+%{target}-strip jpeg.dll
+%{target}-strip -g -R.comment -R.note *.a
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
-
-%{target}-strip -g -R.comment -R.note libjpeg.a
+install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
 
 
-install libjpeg.a $RPM_BUILD_ROOT%{arch}/lib
-install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{arch}/include
+install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{_includedir}
+install *.a $RPM_BUILD_ROOT%{_libdir}
+install jpeg.dll $RPM_BUILD_ROOT%{_dlldir}/libjpeg.dll
+install libjpeg.la $RPM_BUILD_ROOT%{_libdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%{arch}/include/*
-%{arch}/lib/*
+%{_libdir}/libjpeg.dll.a
+%{_libdir}/libjpeg.la
+%{_includedir}/*.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libjpeg.a
+
+%files dll
+%defattr(644,root,root,755)
+%{_dlldir}/libjpeg.dll
This page took 0.102709 seconds and 4 git commands to generate.