| 1 | #define svn_url F:/rd/ports/popt/trunk
|
|---|
| 2 | %define svn_url http://svn.netlabs.org/repos/ports/popt/trunk
|
|---|
| 3 | %define svn_rev 1209
|
|---|
| 4 |
|
|---|
| 5 | %define name popt
|
|---|
| 6 | %define version 1.15
|
|---|
| 7 |
|
|---|
| 8 | Summary: C library for parsing command line parameters
|
|---|
| 9 | Name: %{name}
|
|---|
| 10 | Version: %{version}
|
|---|
| 11 | Release: 5%{?dist}
|
|---|
| 12 | Epoch: 1
|
|---|
| 13 | License: MIT
|
|---|
| 14 | Group: System/Libraries
|
|---|
| 15 | Url: http://rpm5.org/files/popt/
|
|---|
| 16 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
|---|
| 17 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 18 |
|
|---|
| 19 | Requires: popt-libs = %{epoch}:%{version}-%{release}
|
|---|
| 20 | Requires: popt-data = %{epoch}:%{version}-%{release}
|
|---|
| 21 |
|
|---|
| 22 | %description
|
|---|
| 23 | Popt is a C library for parsing command line parameters. Popt was
|
|---|
| 24 | heavily influenced by the getopt() and getopt_long() functions, but
|
|---|
| 25 | it improves on them by allowing more powerful argument expansion.
|
|---|
| 26 | Popt can parse arbitrary argv[] style arrays and automatically set
|
|---|
| 27 | variables based on command line arguments. Popt allows command line
|
|---|
| 28 | arguments to be aliased via configuration files and includes utility
|
|---|
| 29 | functions for parsing arbitrary strings into argv[] arrays using
|
|---|
| 30 | shell-like rules.
|
|---|
| 31 |
|
|---|
| 32 | %package libs
|
|---|
| 33 | Summary: Main %{name} library
|
|---|
| 34 | Group: System/Libraries
|
|---|
| 35 | Requires: popt-data = %{epoch}:%{version}
|
|---|
| 36 |
|
|---|
| 37 | %description libs
|
|---|
| 38 | This package contains the library needed to run programs dynamically
|
|---|
| 39 | linked with the %{name} library.
|
|---|
| 40 |
|
|---|
| 41 | %package devel
|
|---|
| 42 | Summary: Development headers and libraries for %{name}
|
|---|
| 43 | Group: Development/C
|
|---|
| 44 | Requires: popt-libs >= %{epoch}:%{version}
|
|---|
| 45 |
|
|---|
| 46 | %description devel
|
|---|
| 47 | This package contains the header files and libraries needed for
|
|---|
| 48 | developing programs using the %{name} library.
|
|---|
| 49 |
|
|---|
| 50 | %package data
|
|---|
| 51 | Summary: Data files for %{name}
|
|---|
| 52 | Group: System/Libraries
|
|---|
| 53 |
|
|---|
| 54 | %description data
|
|---|
| 55 | This package contains popt data files like locales.
|
|---|
| 56 |
|
|---|
| 57 | %package debug
|
|---|
| 58 | Summary: HLL debug data for exception handling support.
|
|---|
| 59 |
|
|---|
| 60 | %description debug
|
|---|
| 61 | HLL debug data for exception handling support.
|
|---|
| 62 |
|
|---|
| 63 | %prep
|
|---|
| 64 | %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}
|
|---|
| 65 | %setup -q
|
|---|
| 66 | %else
|
|---|
| 67 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 68 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 69 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 70 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 71 | %endif
|
|---|
| 72 |
|
|---|
| 73 | %build
|
|---|
| 74 | export CONFIG_SITE="/@unixroot/usr/share/config.legacy";
|
|---|
| 75 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp";
|
|---|
| 76 | %configure --disable-rpath \
|
|---|
| 77 | --disable-shared --enable-static
|
|---|
| 78 |
|
|---|
| 79 | make %{?_smp_mflags}
|
|---|
| 80 |
|
|---|
| 81 | %install
|
|---|
| 82 | rm -rf %{buildroot}
|
|---|
| 83 | make DESTDIR=${RPM_BUILD_ROOT} install
|
|---|
| 84 | cp popt.dll $RPM_BUILD_ROOT/%{_libdir}
|
|---|
| 85 | %find_lang %name
|
|---|
| 86 |
|
|---|
| 87 | %clean
|
|---|
| 88 | rm -rf %{buildroot}
|
|---|
| 89 |
|
|---|
| 90 | %files
|
|---|
| 91 | %defattr(-,root,root)
|
|---|
| 92 | %doc README
|
|---|
| 93 |
|
|---|
| 94 | %files libs
|
|---|
| 95 | %defattr(-,root,root)
|
|---|
| 96 | %doc README
|
|---|
| 97 | %{_libdir}/*.dll
|
|---|
| 98 |
|
|---|
| 99 | %files devel
|
|---|
| 100 | %defattr(-,root,root)
|
|---|
| 101 | %{_includedir}/%{name}.h
|
|---|
| 102 | %{_libdir}/%{name}*a
|
|---|
| 103 | %{_libdir}/lib%{name}*a
|
|---|
| 104 | %{_mandir}/man3/popt.*
|
|---|
| 105 | %files data -f %{name}.lang
|
|---|
| 106 |
|
|---|
| 107 | %files debug
|
|---|
| 108 | %defattr(-,root,root)
|
|---|
| 109 | %{_libdir}/*.dbg
|
|---|
| 110 |
|
|---|
| 111 | %changelog
|
|---|
| 112 | * Tue Dec 08 2015 yd <yd@os2power.com> 1.15-5
|
|---|
| 113 | - r1209, strip path and extension from programname.
|
|---|
| 114 | - added debug package with symbolic info for exceptq.
|
|---|