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