| 1 | %define name popt
|
|---|
| 2 | %define version 1.15
|
|---|
| 3 |
|
|---|
| 4 | Summary: C library for parsing command line parameters
|
|---|
| 5 | Name: %{name}
|
|---|
| 6 | Version: %{version}
|
|---|
| 7 | Release: 4%{?dist}
|
|---|
| 8 | Epoch: 1
|
|---|
| 9 | License: MIT
|
|---|
| 10 | Group: System/Libraries
|
|---|
| 11 | Url: http://rpm5.org/files/popt/
|
|---|
| 12 | Source0: http://rpm5.org/files/popt/%{name}-%{version}.tar.gz
|
|---|
| 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
|---|
| 14 |
|
|---|
| 15 | Patch0: popt-os2.diff
|
|---|
| 16 |
|
|---|
| 17 | Requires: popt-libs = %{epoch}:%{version}-%{release}
|
|---|
| 18 | Requires: popt-data = %{epoch}:%{version}-%{release}
|
|---|
| 19 |
|
|---|
| 20 | %description
|
|---|
| 21 | Popt is a C library for parsing command line parameters. Popt was
|
|---|
| 22 | heavily influenced by the getopt() and getopt_long() functions, but
|
|---|
| 23 | it improves on them by allowing more powerful argument expansion.
|
|---|
| 24 | Popt can parse arbitrary argv[] style arrays and automatically set
|
|---|
| 25 | variables based on command line arguments. Popt allows command line
|
|---|
| 26 | arguments to be aliased via configuration files and includes utility
|
|---|
| 27 | functions for parsing arbitrary strings into argv[] arrays using
|
|---|
| 28 | shell-like rules.
|
|---|
| 29 |
|
|---|
| 30 | %package libs
|
|---|
| 31 | Summary: Main %{name} library
|
|---|
| 32 | Group: System/Libraries
|
|---|
| 33 | Requires: popt-data = %{epoch}:%{version}
|
|---|
| 34 |
|
|---|
| 35 | %description libs
|
|---|
| 36 | This package contains the library needed to run programs dynamically
|
|---|
| 37 | linked with the %{name} library.
|
|---|
| 38 |
|
|---|
| 39 | %package devel
|
|---|
| 40 | Summary: Development headers and libraries for %{name}
|
|---|
| 41 | Group: Development/C
|
|---|
| 42 | Requires: popt-libs >= %{epoch}:%{version}
|
|---|
| 43 |
|
|---|
| 44 | %description devel
|
|---|
| 45 | This package contains the header files and libraries needed for
|
|---|
| 46 | developing programs using the %{name} library.
|
|---|
| 47 |
|
|---|
| 48 | %package data
|
|---|
| 49 | Summary: Data files for %{name}
|
|---|
| 50 | Group: System/Libraries
|
|---|
| 51 |
|
|---|
| 52 | %description data
|
|---|
| 53 | This package contains popt data files like locales.
|
|---|
| 54 |
|
|---|
| 55 | %prep
|
|---|
| 56 | %setup -q
|
|---|
| 57 | %patch0 -p1 -b .os2~
|
|---|
| 58 |
|
|---|
| 59 | %build
|
|---|
| 60 | CONFIG_SHELL="/bin/sh" ; export CONFIG_SHELL ; \
|
|---|
| 61 | LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; export LDFLAGS ; \
|
|---|
| 62 | %configure --disable-rpath \
|
|---|
| 63 | --disable-shared --enable-static \
|
|---|
| 64 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
|---|
| 65 |
|
|---|
| 66 | make %{?_smp_mflags}
|
|---|
| 67 |
|
|---|
| 68 | %install
|
|---|
| 69 | rm -rf %{buildroot}
|
|---|
| 70 | make DESTDIR=${RPM_BUILD_ROOT} install
|
|---|
| 71 | cp popt.dll $RPM_BUILD_ROOT/%{_libdir}
|
|---|
| 72 | #%find_lang %name
|
|---|
| 73 |
|
|---|
| 74 | %clean
|
|---|
| 75 | rm -rf %{buildroot}
|
|---|
| 76 |
|
|---|
| 77 | %files
|
|---|
| 78 | %defattr(-,root,root)
|
|---|
| 79 | %doc README
|
|---|
| 80 |
|
|---|
| 81 | %files libs
|
|---|
| 82 | %defattr(-,root,root)
|
|---|
| 83 | %doc README
|
|---|
| 84 | %{_libdir}/*.dll
|
|---|
| 85 |
|
|---|
| 86 | %files devel
|
|---|
| 87 | %defattr(-,root,root)
|
|---|
| 88 | %{_includedir}/%{name}.h
|
|---|
| 89 | %{_libdir}/%{name}*a
|
|---|
| 90 | %{_libdir}/lib%{name}*a
|
|---|
| 91 | #%{_libdir}/*.dll
|
|---|
| 92 | %{_mandir}/man3/popt.*
|
|---|
| 93 |
|
|---|
| 94 | %files data
|
|---|
| 95 | # -f %{name}.lang
|
|---|
| 96 | %defattr(-,root,root)
|
|---|
| 97 | %{_datadir}/locale/*
|
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 | %changelog
|
|---|