]>
Commit | Line | Data |
---|---|---|
dff71bdc | 1 | # TODO: 1. Resolve conflict with libcfg+-devel - header files |
2 | # as the same name. | |
3 | # 2. Fix refreshing configure. | |
4 | # NOTE: Lack of C API documentation in manpage | |
e5b7c73c | 5 | # |
dff71bdc | 6 | # Conditional builds: |
7 | %bcond_with ex # build with external OSSP ex library | |
8 | %bcond_without perl # build Perl bindings to C API | |
e5b7c73c | 9 | # |
f9c56c65 | 10 | Summary: OSSP cfg - Configuration Parsing |
fea57080 | 11 | Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji |
f9c56c65 | 12 | Name: cfg |
edb3a39d | 13 | Version: 0.9.11 |
f9c56c65 | 14 | Release: 0.1 |
8d4ab9e0 | 15 | Epoch: 0 |
f9c56c65 | 16 | License: distributable (see README) |
17 | Group: Libraries | |
18 | Source0: ftp://ftp.ossp.org/pkg/lib/cfg/%{name}-%{version}.tar.gz | |
edb3a39d | 19 | # Source0-md5: 28bccd084b64b045b3e19eea54e001b6 |
f9c56c65 | 20 | URL: http://www.ossp.org/pkg/lib/cfg/ |
21 | BuildRequires: autoconf | |
2e487087 | 22 | BuildRequires: automake |
f9c56c65 | 23 | BuildRequires: bison |
e5b7c73c | 24 | %{?with_ex:BuildRequires: ex-devel} |
4e86619f | 25 | BuildRequires: flex |
f9c56c65 | 26 | BuildRequires: libtool |
dff71bdc | 27 | %{?with_perl:BuildRequires: perl-devel} |
f9c56c65 | 28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
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. | |
37 | ||
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. | |
44 | ||
fc27512a | 45 | %description -l pl.UTF-8 |
fea57080 | 46 | OSSP cfg to biblioteka ISO-C do analizy dowolnych plików |
fc27512a JR |
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. | |
8d4ab9e0 | 52 | |
fc27512a JR |
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 | |
8d4ab9e0 JB |
58 | (AST), przechodzenie po AST i opcjonalnie eksportowanie AST z powrotem |
59 | do tekstu konfiguracji. | |
f9c56c65 | 60 | |
61 | %package devel | |
62 | Summary: OSSP cfg - Configuration Parsing - header files and development libraries | |
fea57080 | 63 | Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji - pliki nagłówkowe i biblioteki dla deweloperów |
f9c56c65 | 64 | Group: Development/Libraries |
4e86619f | 65 | Requires: %{name} = %{epoch}:%{version}-%{release} |
f9c56c65 | 66 | |
67 | %description devel | |
68 | OSSP cfg - Configuration Parsing - header files and development | |
69 | libraries. | |
70 | ||
fc27512a | 71 | %description devel -l pl.UTF-8 |
fea57080 | 72 | OSSP cfg - analiza konfiguracji - pliki nagłówkowe i biblioteki dla |
fc27512a | 73 | deweloperów. |
f9c56c65 | 74 | |
75 | %package static | |
76 | Summary: OSSP cfg - Configuration Parsing - static libraries | |
fea57080 | 77 | Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji - biblioteki statyczne |
f9c56c65 | 78 | Group: Development/Libraries |
4e86619f | 79 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
f9c56c65 | 80 | |
81 | %description static | |
82 | OSSP cfg - Configuration Parsing - static libraries. | |
83 | ||
fc27512a | 84 | %description static -l pl.UTF-8 |
fea57080 | 85 | OSSP cfg - analiza konfiguracji - biblioteki statyczne. |
f9c56c65 | 86 | |
dff71bdc | 87 | %package -n perl-cfg |
e5b7c73c | 88 | Summary: OSSP cfg - Configuration Parsing - Perl bindings |
fea57080 | 89 | Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji - dowiązania Perla |
dff71bdc | 90 | Group: Development/Languages/Perl |
91 | ||
92 | %description -n perl-cfg | |
93 | OSSP cfg - Configuration Parsing - Perl bindings to C API. | |
94 | ||
fc27512a | 95 | %description -n perl-cfg -l pl.UTF-8 |
fea57080 | 96 | OSSP cfg - analiza konfiguracji - dowiązania Perla do API C. |
e5b7c73c | 97 | |
f9c56c65 | 98 | %prep |
99 | %setup -q | |
100 | ||
4e86619f | 101 | %build |
dff71bdc | 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 | |
105 | #%%{__libtoolize} | |
106 | #%%{__aclocal} | |
107 | #%%{__autoconf} | |
108 | %configure \ | |
109 | %{?with_ex:--with-ex} \ | |
110 | %{?with_perl:--with-perl} | |
111 | ||
f9c56c65 | 112 | %{__make} |
113 | ||
dff71bdc | 114 | %if %{with_perl} |
115 | cd perl | |
116 | %{__perl} Makefile.PL \ | |
117 | INSTALLDIRS=vendor | |
118 | %{__make} \ | |
119 | OPTIMIZE="%{rpmcflags}" | |
120 | %endif | |
121 | ||
f9c56c65 | 122 | %install |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %{__make} install \ | |
dff71bdc | 126 | DESTDIR=$RPM_BUILD_ROOT \ |
127 | INSTALLDIRS=vendor | |
f9c56c65 | 128 | |
129 | %clean | |
130 | rm -rf $RPM_BUILD_ROOT | |
131 | ||
8d4ab9e0 JB |
132 | %post -p /sbin/ldconfig |
133 | %postun -p /sbin/ldconfig | |
f9c56c65 | 134 | |
135 | %files | |
136 | %defattr(644,root,root,755) | |
137 | %doc AUTHORS ChangeLog HACKING README THANKS TODO | |
138 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* | |
139 | ||
140 | %files devel | |
141 | %defattr(644,root,root,755) | |
142 | %attr(755,root,root) %{_bindir}/* | |
143 | %attr(755,root,root) %{_libdir}/lib*.so | |
144 | %{_libdir}/lib*.la | |
145 | %{_includedir}/* | |
e5b7c73c | 146 | %{_mandir}/man3/cfg.3* |
f9c56c65 | 147 | |
148 | %files static | |
149 | %defattr(644,root,root,755) | |
150 | %attr(755,root,root) %{_libdir}/lib*.a | |
dff71bdc | 151 | |
152 | %files -n perl-cfg | |
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 | |
e5b7c73c | 160 | %{_mandir}/man3/OSSP::cfg.3pm* |