]> git.pld-linux.org Git - packages/crossmingw32-libjpeg.git/blob - crossmingw32-libjpeg.spec
09e4026a2008b03aafe7a42f11d732223bf35657
[packages/crossmingw32-libjpeg.git] / crossmingw32-libjpeg.spec
1 %define         realname        libjpeg
2 Summary:        Library for handling different jpeg files - Mingw32 cross version
3 Summary(pl.UTF-8):      Biblioteka do manipulacji plikami w formacie jpeg - wersja skrośna dla Mingw32
4 Name:           crossmingw32-%{realname}
5 Version:        6b
6 Release:        5
7 License:        distributable
8 Group:          Libraries
9 Source0:        ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v%{version}.tar.gz
10 # Source0-md5:  dbd5f3b47ed13132f04c685d608a7547
11 Patch0:         %{realname}-DESTDIR.patch
12 Patch1:         %{realname}-include.patch
13 Patch2:         %{realname}-c++.patch
14 Patch3:         %{name}-shared.patch
15 URL:            http://www.ijg.org/
16 Requires:       crossmingw32-runtime
17 BuildRequires:  crossmingw32-gcc
18 BuildRequires:  crossmingw32-w32api
19 BuildRequires:  libtool
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         no_install_post_strip   1
23
24 %define         target                  i386-mingw32
25 %define         target_platform         i386-pc-mingw32
26 %define         arch                    %{_prefix}/%{target}
27 %define         gccarch                 %{_prefix}/lib/gcc-lib/%{target}
28 %define         gcclib                  %{_prefix}/lib/gcc-lib/%{target}/%{version}
29
30 %define         _sysprefix              /usr
31 %define         _prefix                 %{_sysprefix}/%{target}
32 %define         _pkgconfigdir           %{_prefix}/lib/pkgconfig
33 %define         __cc                    %{target}-gcc
34 %define         __cxx                   %{target}-g++
35
36 %ifarch alpha sparc sparc64 sparcv9
37 %define         optflags        -O2
38 %endif
39
40 %description
41 The libjpeg package contains a library of functions for manipulating
42 JPEG images.
43
44 %description -l pl.UTF-8
45 Ten pakiet zawiera bibliotekę funkcji do manipulacji plikami jpeg.
46
47 %package dll
48 Summary:        libjpeg - DLL library for Windows
49 Summary(pl.UTF-8):      libjpeg - biblioteka DLL dla Windows
50 Group:          Applications/Emulators
51
52 %description dll
53 libjpeg - DLL library for Windows.
54
55 %description dll -l pl.UTF-8
56 libjpeg - biblioteka DLL dla Windows.
57
58 %prep
59 %setup -q -n jpeg-%{version}
60 %patch0 -p1
61 %patch1 -p1
62 %patch2 -p1
63 %patch3 -p1
64
65 %build
66 CC=%{target}-gcc ; export CC
67 CXX=%{target}-g++ ; export CXX
68 LD=%{target}-ld ; export LD
69 AR=%{target}-ar ; export AR
70 AS=%{target}-as ; export AS
71 CROSS_COMPILE=1 ; export CROSS_COMPILE
72 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
73 RANLIB=%{target}-ranlib ; export RANLIB
74 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
75 TARGET="%{target}" ; export TARGET
76
77 %configure \
78         --target=%{target} \
79         --host=%{target} \
80         --build=i386-linux \
81         --prefix=%{arch}
82
83 %{__make}
84 %{__make} jpeg.dll
85
86 cat << "EOF" >> libjpeg.la
87 # libjpeg.la - a libtool library file
88 # Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
89 # ^^^^ This line needs to stay
90 # Made by czarny czarny at pld-linux.org
91
92 # The name that we can dlopen(3).
93 dlname='../bin/libjpeg.dll'
94
95 # Names of this library.
96 library_names='libjpeg.dll.a'
97
98 # The name of the static archive.
99 old_library='libjpeg.a'
100
101 # Libraries that this one depends upon.
102 dependency_libs=''
103
104 # Version information for libz.
105 current=0
106 age=0
107 revision=0
108
109 # Is this an already installed library?
110 installed=yes
111
112 # Should we warn about portability when linking against -modules?
113 shouldnotlink=no
114
115 # Files to dlopen/dlpreopen
116 dlopen=''
117 dlpreopen=''
118
119 # Directory that this library needs to be installed in:
120 libdir='%{_libdir}'
121 EOF
122
123 %{target}-strip jpeg.dll
124 %{target}-strip -g -R.comment -R.note *.a
125
126 %install
127 rm -rf $RPM_BUILD_ROOT
128 install -d $RPM_BUILD_ROOT%{_prefix}/{include,lib,bin}
129
130 install jconfig.h jerror.h jmorecfg.h jpeglib.h jversion.h $RPM_BUILD_ROOT%{_includedir}
131 install *.a $RPM_BUILD_ROOT%{_libdir}
132 install jpeg.dll $RPM_BUILD_ROOT%{_bindir}/libjpeg.dll
133 install libjpeg.la $RPM_BUILD_ROOT%{_libdir}
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %files
139 %defattr(644,root,root,755)
140 %{_includedir}/*.h
141 %{_libdir}/*.la
142 %{_libdir}/*.a
143
144 %files dll
145 %defattr(644,root,root,755)
146 %{_bindir}/*.dll
This page took 0.026584 seconds and 2 git commands to generate.