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.UTF-8): OSSP cfg - analiza konfiguracji
15 License: distributable (see README)
17 Source0: ftp://ftp.ossp.org/pkg/lib/cfg/%{name}-%{version}.tar.gz
18 # Source0-md5: 28bccd084b64b045b3e19eea54e001b6
19 URL: http://www.ossp.org/pkg/lib/cfg/
20 BuildRequires: autoconf
21 BuildRequires: automake
23 %{?with_ex:BuildRequires: ex-devel}
25 BuildRequires: libtool
26 %{?with_perl:BuildRequires: perl-devel}
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 OSSP cfg is a ISO-C library for parsing arbitrary C/C++-style
31 configuration files. A configuration is sequence of directives. Each
32 directive consists of zero or more tokens. Each token can be either a
33 string or again a complete sequence. This means the configuration
34 syntax has a recursive structure and this way allows to create
35 configurations with arbitrarily nested sections.
37 Additionally the configuration syntax provides complex
38 single/double/balanced quoting of tokens, hexadecimal/octal/decimal
39 character encodings, character escaping, C/C++ and Shell-style
40 comments, etc. The library API allows importing a configuration text
41 into an Abstract Syntax Tree (AST), traversing the AST and optionally
42 exporting the AST again as a configuration text.
44 %description -l pl.UTF-8
45 OSSP cfg to biblioteka ISO-C do analizy dowolnych plików
46 konfiguracyjnych w stylu C/C++. Konfiguracja jest sekwencją dyrektyw.
47 Każda dyrektywa zawiera zero lub więcej tokenów. Każdy token może być
48 łańcuchem albo znowu całą sekwencją. Oznacza to, że składnia
49 konfiguracji ma strukturę rekurencyjną, co pozwala tworzyć
50 konfiguracje z dowolnie zagnieżdżonymi sekcjami.
52 Składnia konfiguracji udostępnia dodatkowo złożone
53 pojedyncze/podwójne/zrównoważone cytowanie tokenów,
54 szesnastkowe/ósemkowe/dziesiętne kodowanie znaków, cytowanie znaków,
55 komentarze w stylu C/C++ i powłoki itp. API biblioteki umożliwia
56 importowanie tekstu konfiguracji do abstrakcyjnych drzew składniowych
57 (AST), przechodzenie po AST i opcjonalnie eksportowanie AST z powrotem
58 do tekstu konfiguracji.
61 Summary: OSSP cfg - Configuration Parsing - header files and development libraries
62 Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji - pliki nagłówkowe i biblioteki dla deweloperów
63 Group: Development/Libraries
64 Requires: %{name} = %{version}-%{release}
67 OSSP cfg - Configuration Parsing - header files and development
70 %description devel -l pl.UTF-8
71 OSSP cfg - analiza konfiguracji - pliki nagłówkowe i biblioteki dla
75 Summary: OSSP cfg - Configuration Parsing - static libraries
76 Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji - biblioteki statyczne
77 Group: Development/Libraries
78 Requires: %{name}-devel = %{version}-%{release}
81 OSSP cfg - Configuration Parsing - static libraries.
83 %description static -l pl.UTF-8
84 OSSP cfg - analiza konfiguracji - biblioteki statyczne.
87 Summary: OSSP cfg - Configuration Parsing - Perl bindings
88 Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji - dowiązania Perla
89 Group: Development/Languages/Perl
91 %description -n perl-cfg
92 OSSP cfg - Configuration Parsing - Perl bindings to C API.
94 %description -n perl-cfg -l pl.UTF-8
95 OSSP cfg - analiza konfiguracji - dowiązania Perla do API C.
101 # don't uncomment what is commented out below -
102 # - since v0.9.7 it doesn't work
103 #mv -f aclocal.m4 acinclude.m4
108 %{?with_ex:--with-ex} \
109 %{?with_perl:--with-perl}
115 %{__perl} Makefile.PL \
118 OPTIMIZE="%{rpmcflags}"
122 rm -rf $RPM_BUILD_ROOT
125 DESTDIR=$RPM_BUILD_ROOT \
129 rm -rf $RPM_BUILD_ROOT
131 %post -p /sbin/ldconfig
132 %postun -p /sbin/ldconfig
135 %defattr(644,root,root,755)
136 %doc AUTHORS ChangeLog HACKING README THANKS TODO
137 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
140 %defattr(644,root,root,755)
141 %attr(755,root,root) %{_bindir}/*
142 %attr(755,root,root) %{_libdir}/lib*.so
145 %{_mandir}/man3/cfg.3*
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_libdir}/lib*.a
152 %defattr(644,root,root,755)
153 %dir %{perl_vendorarch}/OSSP
154 %{perl_vendorarch}/OSSP/cfg.pm
155 %dir %{perl_vendorarch}/auto/OSSP
156 %dir %{perl_vendorarch}/auto/OSSP/cfg
157 %{perl_vendorarch}/auto/OSSP/cfg/cfg.bs
158 %attr(755,root,root) %{perl_vendorarch}/auto/OSSP/cfg/cfg.so
159 %{_mandir}/man3/OSSP::cfg.3pm*