source: spec/trunk/SPECS/libjpeg.spec

Last change on this file was 914, checked in by Silvan Scherrer, 9 years ago

spec: libjpeg: Release version 8d-2.

File size: 3.8 KB
RevLine 
[850]1#define svn_url e:/trees/libjpeg/trunk
2%define svn_url http://svn.netlabs.org/repos/ports/libjpeg/trunk
[914]3%define svn_rev 1848
[850]4
[256]5Summary: A library for manipulating JPEG image format files
6Name: libjpeg
[850]7Version: 8d
[914]8Release: 2%{?dist}
[256]9License: IJG
10Group: System Environment/Libraries
11URL: http://www.ijg.org/
12
[850]13Vendor: bww bitwise works GmbH
14Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
[256]15
[850]16# DEF files to create forwarders for the legacy package
17Source10: jpeg.def
[256]18
[850]19BuildRequires: autoconf libtool
[256]20BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21
22%description
23The libjpeg package contains a library of functions for manipulating
24JPEG images, as well as simple client programs for accessing the
25libjpeg functions. Libjpeg client programs include cjpeg, djpeg,
26jpegtran, rdjpgcom and wrjpgcom. Cjpeg compresses an image file into
27JPEG format. Djpeg decompresses a JPEG file into a regular image
28file. Jpegtran can perform various useful transformations on JPEG
29files. Rdjpgcom displays any text comments included in a JPEG file.
30Wrjpgcom inserts text comments into a JPEG file.
31
32%package devel
33Summary: Development tools for programs which will use the libjpeg library
34Group: Development/Libraries
35Requires: libjpeg = %{version}-%{release}
36
37%description devel
38The libjpeg-devel package includes the header files and documentation
39necessary for developing programs which will manipulate JPEG files using
40the libjpeg library.
41
42If you are going to develop programs which will manipulate JPEG images,
43you should install libjpeg-devel. You'll also need to have the libjpeg
44package installed.
45
46%package static
47Summary: Static JPEG image format file library
48Group: Development/Libraries
49Requires: libjpeg-devel = %{version}-%{release}
50
51%description static
52The libjpeg-static package contains the statically linkable version of libjpeg.
53Linking to static libraries is discouraged for most applications, but it is
54necessary for some boot packages.
55
[850]56%debug_package
57
[256]58%prep
[850]59%if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
60%setup -q
61%else
62%setup -n "%{name}-%{version}" -Tc
63svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
64rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
65(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
66%endif
[256]67
[850]68# Prepare forwarder DLLs.
69for m in %{SOURCE10}; do
70 cp ${m} .
71done
[256]72
[850]73# Hack: disable autoheader so that it doesn't overwrite our cfg template.
74export AUTOHEADER="echo autoheader ignored"
75autoreconf -vif
76
[256]77%build
78export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
[914]79export VENDOR="%{vendor}"
[256]80%configure \
[850]81 --enable-shared --enable-static
[256]82
83make %{?_smp_mflags}
84
[850]85%check
86# this export is needed, as else the dll for the tests are not found
87export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/.libs
88make test
89
[256]90%install
91rm -rf $RPM_BUILD_ROOT
92%makeinstall
93
[850]94#install -m 755 jpeg.dll $RPM_BUILD_ROOT/%{_libdir}
95#install -m 755 .libs/jpeg_s.a $RPM_BUILD_ROOT/%{_libdir}
[256]96
97# We don't ship .la files.
98rm $RPM_BUILD_ROOT%{_libdir}/*.la
99
[850]100# Generate & install forwarder DLLs.
[914]101gcc -Zomf -Zdll -nostdlib jpeg.def -l$RPM_BUILD_ROOT/%{_libdir}/jpeg8.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/jpeg.dll
[850]102
[256]103%files
104%defattr(-,root,root)
105%doc usage.txt README
106%{_libdir}/jpeg*.dll
[850]107%{_bindir}/*.exe
[256]108%{_mandir}/*/*
109
110%files devel
111%defattr(-,root,root)
112%doc libjpeg.txt coderules.txt structure.txt wizard.txt example.c
[850]113%{_libdir}/jpeg*_dll.a
[256]114%{_includedir}/*.h
115
116%files static
117%defattr(-,root,root)
[850]118%{_libdir}/jpeg.a
[256]119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%changelog
[914]124* Wed Nov 30 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 8d-2
125- add -nostdlib to forwarders, to need less heap
126
[850]127* Wed Sep 21 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 8d-1
128- update to version 8d
129- change build part
130- add debug files
131
[256]132* Mon Dec 19 2011 yd
133- initial build.
Note: See TracBrowser for help on using the repository browser.