source: spec/trunk/SPECS/libjpeg.spec@ 1010

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

spec: libjpeg: Release version 8d-2.

File size: 3.8 KB
Line 
1#define svn_url e:/trees/libjpeg/trunk
2%define svn_url http://svn.netlabs.org/repos/ports/libjpeg/trunk
3%define svn_rev 1848
4
5Summary: A library for manipulating JPEG image format files
6Name: libjpeg
7Version: 8d
8Release: 2%{?dist}
9License: IJG
10Group: System Environment/Libraries
11URL: http://www.ijg.org/
12
13Vendor: bww bitwise works GmbH
14Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
15
16# DEF files to create forwarders for the legacy package
17Source10: jpeg.def
18
19BuildRequires: autoconf libtool
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
56%debug_package
57
58%prep
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
67
68# Prepare forwarder DLLs.
69for m in %{SOURCE10}; do
70 cp ${m} .
71done
72
73# Hack: disable autoheader so that it doesn't overwrite our cfg template.
74export AUTOHEADER="echo autoheader ignored"
75autoreconf -vif
76
77%build
78export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
79export VENDOR="%{vendor}"
80%configure \
81 --enable-shared --enable-static
82
83make %{?_smp_mflags}
84
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
90%install
91rm -rf $RPM_BUILD_ROOT
92%makeinstall
93
94#install -m 755 jpeg.dll $RPM_BUILD_ROOT/%{_libdir}
95#install -m 755 .libs/jpeg_s.a $RPM_BUILD_ROOT/%{_libdir}
96
97# We don't ship .la files.
98rm $RPM_BUILD_ROOT%{_libdir}/*.la
99
100# Generate & install forwarder DLLs.
101gcc -Zomf -Zdll -nostdlib jpeg.def -l$RPM_BUILD_ROOT/%{_libdir}/jpeg8.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/jpeg.dll
102
103%files
104%defattr(-,root,root)
105%doc usage.txt README
106%{_libdir}/jpeg*.dll
107%{_bindir}/*.exe
108%{_mandir}/*/*
109
110%files devel
111%defattr(-,root,root)
112%doc libjpeg.txt coderules.txt structure.txt wizard.txt example.c
113%{_libdir}/jpeg*_dll.a
114%{_includedir}/*.h
115
116%files static
117%defattr(-,root,root)
118%{_libdir}/jpeg.a
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
123%changelog
124* Wed Nov 30 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> - 8d-2
125- add -nostdlib to forwarders, to need less heap
126
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
132* Mon Dec 19 2011 yd
133- initial build.
Note: See TracBrowser for help on using the repository browser.