1 # TODO: 1. Resolve conflict with libcfg+-devel - header files
3 # 2. Fix refreshing configure.
4 # NOTE: Lack of C API documentation in manpage
7 %bcond_with ex # build with external OSSP ex library
8 %bcond_without perl # build Perl bindings to C API
10 Summary: OSSP cfg - Configuration Parsing
11 Summary(pl): OSSP cfg - parsowanie konfiguracji
16 License: distributable (see README)
18 Source0: ftp://ftp.ossp.org/pkg/lib/cfg/%{name}-%{version}.tar.gz
19 # Source0-md5: 66576d4d4ee01b29666aa19aaa3faa71
20 URL: http://www.ossp.org/pkg/lib/cfg/
21 BuildRequires: autoconf
22 BuildRequires: automake
24 %{?with_ex:BuildRequires: ex-devel}
26 BuildRequires: libtool
27 %{?with_perl:BuildRequires: perl-devel}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 OSSP cfg is a ISO-C library for parsing arbitrary C/C++-style
32 configuration files. A configuration is sequence of directives. Each
33 directive consists of zero or more tokens. Each token can be either a
34 string or again a complete sequence. This means the configuration
35 syntax has a recursive structure and this way allows to create
36 configurations with arbitrarily nested sections.
38 Additionally the configuration syntax provides complex
39 single/double/balanced quoting of tokens, hexadecimal/octal/decimal
40 character encodings, character escaping, C/C++ and Shell-style
41 comments, etc. The library API allows importing a configuration text
42 into an Abstract Syntax Tree (AST), traversing the AST and optionally
43 exporting the AST again as a configuration text.
46 OSSP cfg to biblioteka ISO-C do parsowania dowolnych plików
47 konfiguracyjnych w stylu C/C++. Konfiguracja jest sekwencj± dyrektyw.
48 Ka¿da dyrektywa zawiera zero lub wiêcej tokenów. Ka¿dy token mo¿e byæ
49 ³añcuchem albo znowu ca³± sekwencj±. Oznacza to, ¿e sk³adnia
50 konfiguracji ma strukturê rekurencyjn±, co pozwala tworzyæ
51 konfiguracje z dowolnie zagnie¿d¿onymi sekcjami.
53 Sk³adnia konfiguracji udostêpnia dodatkowo z³o¿one
54 pojedyncze/podwójne/zrównowa¿one cytowanie tokenów,
55 szesnastkowe/ósemkowe/dziesiêtne kodowanie znaków, cytowanie znaków,
56 komentarze w stylu C/C++ i pow³oki itp. API biblioteki umo¿liwia
57 importowanie tekstu konfiguracji do abstrakcyjnych drzew sk³adniowych
58 (AST), przechodzenie po AST i opcjonalnie eksportowanie AST z powrotem
59 do tekstu konfiguracji.
62 Summary: OSSP cfg - Configuration Parsing - header files and development libraries
63 Summary(pl): OSSP cfg - parsowanie konfiguracji - pliki nag³ówkowe i biblioteki dla deweloperów
64 Group: Development/Libraries
65 Requires: %{name} = %{epoch}:%{version}-%{release}
68 OSSP cfg - Configuration Parsing - header files and development
71 %description devel -l pl
72 OSSP cfg - parsowanie konfiguracji - pliki nag³ówkowe i biblioteki dla
76 Summary: OSSP cfg - Configuration Parsing - static libraries
77 Summary(pl): OSSP cfg - parsowanie konfiguracji - biblioteki statyczne
78 Group: Development/Libraries
79 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
82 OSSP cfg - Configuration Parsing - static libraries.
84 %description static -l pl
85 OSSP cfg - parsowanie konfiguracji - biblioteki statyczne.
88 Summary: OSSP cfg - Configuration Parsing - Perl bindings
89 Summary(pl): OSSP cfg - parsowanie konfiguracji - dowi±zania Perla
90 Group: Development/Languages/Perl
92 %description -n perl-cfg
93 OSSP cfg - Configuration Parsing - Perl bindings to C API.
95 %description -n perl-cfg -l pl
96 OSSP cfg - parsowanie konfiguracji - dowi±zania Perla do API C.
102 # don't uncomment what is commented out below -
103 # - since v0.9.7 it doesn't work
104 #mv -f aclocal.m4 acinclude.m4
109 %{?with_ex:--with-ex} \
110 %{?with_perl:--with-perl}
116 %{__perl} Makefile.PL \
119 OPTIMIZE="%{rpmcflags}"
123 rm -rf $RPM_BUILD_ROOT
126 DESTDIR=$RPM_BUILD_ROOT \
130 rm -rf $RPM_BUILD_ROOT
132 %post -p /sbin/ldconfig
133 %postun -p /sbin/ldconfig
136 %defattr(644,root,root,755)
137 %doc AUTHORS ChangeLog HACKING README THANKS TODO
138 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
141 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_bindir}/*
143 %attr(755,root,root) %{_libdir}/lib*.so
146 %{_mandir}/man3/cfg.3*
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/lib*.a
153 %defattr(644,root,root,755)
154 %dir %{perl_vendorarch}/OSSP
155 %{perl_vendorarch}/OSSP/cfg.pm
156 %dir %{perl_vendorarch}/auto/OSSP
157 %dir %{perl_vendorarch}/auto/OSSP/cfg
158 %{perl_vendorarch}/auto/OSSP/cfg/cfg.bs
159 %attr(755,root,root) %{perl_vendorarch}/auto/OSSP/cfg/cfg.so
160 %{_mandir}/man3/OSSP::cfg.3pm*