| 1 | # Note: this .spec is borrowed from expat-2.1.0-10.fc22.src.rpm
|
|---|
| 2 |
|
|---|
| 3 | Summary: An XML parser library
|
|---|
| 4 | Name: expat
|
|---|
| 5 | Version: 2.1.0
|
|---|
| 6 | Release: 12%{?dist}
|
|---|
| 7 | Group: System Environment/Libraries
|
|---|
| 8 | #Source: http://downloads.sourceforge.net/expat/expat-%{version}.tar.gz
|
|---|
| 9 | URL: http://www.libexpat.org/
|
|---|
| 10 | License: MIT
|
|---|
| 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|---|
| 12 | BuildRequires: autoconf, automake, libtool
|
|---|
| 13 | #BuildRequires: check-devel
|
|---|
| 14 |
|
|---|
| 15 | %define svn_url http://svn.netlabs.org/repos/ports/expat/trunk
|
|---|
| 16 | %define svn_rev 770
|
|---|
| 17 |
|
|---|
| 18 | Source: %{name}-%{version}-r%{svn_rev}.zip
|
|---|
| 19 |
|
|---|
| 20 | BuildRequires: gcc make subversion zip
|
|---|
| 21 |
|
|---|
| 22 | %description
|
|---|
| 23 | This is expat, the C library for parsing XML, written by James Clark. Expat
|
|---|
| 24 | is a stream oriented XML parser. This means that you register handlers with
|
|---|
| 25 | the parser prior to starting the parse. These handlers are called when the
|
|---|
| 26 | parser discovers the associated structures in the document being parsed. A
|
|---|
| 27 | start tag is an example of the kind of structures for which you may
|
|---|
| 28 | register handlers.
|
|---|
| 29 |
|
|---|
| 30 | %package devel
|
|---|
| 31 | Summary: Libraries and header files to develop applications using expat
|
|---|
| 32 | Group: Development/Libraries
|
|---|
| 33 | Requires: expat = %{version}-%{release}
|
|---|
| 34 |
|
|---|
| 35 | %description devel
|
|---|
| 36 | The expat-devel package contains the libraries, include files and documentation
|
|---|
| 37 | to develop XML applications with expat.
|
|---|
| 38 |
|
|---|
| 39 | %package static
|
|---|
| 40 | Summary: expat XML parser static library
|
|---|
| 41 | Group: Development/Libraries
|
|---|
| 42 | Requires: expat-devel%{?_isa} = %{version}-%{release}
|
|---|
| 43 |
|
|---|
| 44 | %description static
|
|---|
| 45 | The expat-static package contains the static version of the expat library.
|
|---|
| 46 | Install it if you need to link statically with expat.
|
|---|
| 47 |
|
|---|
| 48 | %package debug
|
|---|
| 49 | Summary: HLL debug data for exception handling support.
|
|---|
| 50 |
|
|---|
| 51 | %description debug
|
|---|
| 52 | HLL debug data for exception handling support.
|
|---|
| 53 |
|
|---|
| 54 | %prep
|
|---|
| 55 | %if %(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
|
|---|
| 56 | %setup -q
|
|---|
| 57 | %else
|
|---|
| 58 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 59 | svn export -r %{svn_rev} %{svn_url} . --force
|
|---|
| 60 | rm -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip"
|
|---|
| 61 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" "%{name}-%{version}")
|
|---|
| 62 | %endif
|
|---|
| 63 |
|
|---|
| 64 | # make sure configure is updated to properly support OS/2
|
|---|
| 65 | buildconf.sh
|
|---|
| 66 |
|
|---|
| 67 | %build
|
|---|
| 68 | #rm -rf autom4te*.cache
|
|---|
| 69 | #libtoolize --copy --force --automake && aclocal && autoheader && autoconf
|
|---|
| 70 | export CFLAGS="$RPM_OPT_FLAGS"
|
|---|
| 71 | export LDFLAGS="-Zomf -Zhigh-mem -Zargs-wild -Zargs-resp -Zbin-files"
|
|---|
| 72 | %configure
|
|---|
| 73 | make %{?_smp_mflags}
|
|---|
| 74 |
|
|---|
| 75 | %install
|
|---|
| 76 | rm -rf ${RPM_BUILD_ROOT}
|
|---|
| 77 |
|
|---|
| 78 | rm -f examples/*.dsp examples/.cvsignore
|
|---|
| 79 | chmod 644 README COPYING Changes doc/* examples/*
|
|---|
| 80 |
|
|---|
| 81 | make install DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 82 |
|
|---|
| 83 | rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|---|
| 84 |
|
|---|
| 85 | #%check
|
|---|
| 86 | #make check
|
|---|
| 87 |
|
|---|
| 88 | %clean
|
|---|
| 89 | rm -rf ${RPM_BUILD_ROOT}
|
|---|
| 90 |
|
|---|
| 91 | %files
|
|---|
| 92 | %defattr(-,root,root)
|
|---|
| 93 | %doc README
|
|---|
| 94 | %{!?_licensedir:%global license %%doc}
|
|---|
| 95 | %license COPYING
|
|---|
| 96 | %{_bindir}/*
|
|---|
| 97 | %{_libdir}/*.dll
|
|---|
| 98 | %{_mandir}/*/*
|
|---|
| 99 |
|
|---|
| 100 | %files devel
|
|---|
| 101 | %defattr(-,root,root)
|
|---|
| 102 | %doc Changes doc examples
|
|---|
| 103 | %{_libdir}/*_dll.a
|
|---|
| 104 | %{_libdir}/pkgconfig/*.pc
|
|---|
| 105 | %{_includedir}/*.h
|
|---|
| 106 |
|
|---|
| 107 | %files static
|
|---|
| 108 | %defattr(-,root,root)
|
|---|
| 109 | %exclude %{_libdir}/*_dll.a
|
|---|
| 110 | %{_libdir}/*.a
|
|---|
| 111 |
|
|---|
| 112 | %files debug
|
|---|
| 113 | %defattr(-,root,root)
|
|---|
| 114 | %{_libdir}/*.dbg
|
|---|
| 115 |
|
|---|
| 116 | %changelog
|
|---|
| 117 | * Mon Sep 08 2014 yd
|
|---|
| 118 | - added debug package with symbolic info for exceptq.
|
|---|
| 119 |
|
|---|
| 120 | * Wed Sep 3 2014 Dmitriy Kuminov <coding@dmik.org> 2.1.0-11
|
|---|
| 121 | - Rebuild with high memory support.
|
|---|
| 122 |
|
|---|
| 123 | * Mon Sep 1 2014 Dmitriy Kuminov <coding@dmik.org> 2.1.0-10
|
|---|
| 124 | - Initial package for version 2.1.0.
|
|---|