]> git.pld-linux.org Git - packages/cfg.git/blame - cfg.spec
- do not define epoch 0
[packages/cfg.git] / cfg.spec
CommitLineData
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 10Summary: OSSP cfg - Configuration Parsing
fea57080 11Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji
f9c56c65 12Name: cfg
edb3a39d 13Version: 0.9.11
f9c56c65 14Release: 0.1
15License: distributable (see README)
16Group: Libraries
17Source0: ftp://ftp.ossp.org/pkg/lib/cfg/%{name}-%{version}.tar.gz
edb3a39d 18# Source0-md5: 28bccd084b64b045b3e19eea54e001b6
f9c56c65 19URL: http://www.ossp.org/pkg/lib/cfg/
20BuildRequires: autoconf
2e487087 21BuildRequires: automake
f9c56c65 22BuildRequires: bison
e5b7c73c 23%{?with_ex:BuildRequires: ex-devel}
4e86619f 24BuildRequires: flex
f9c56c65 25BuildRequires: libtool
dff71bdc 26%{?with_perl:BuildRequires: perl-devel}
f9c56c65 27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30OSSP cfg is a ISO-C library for parsing arbitrary C/C++-style
31configuration files. A configuration is sequence of directives. Each
32directive consists of zero or more tokens. Each token can be either a
33string or again a complete sequence. This means the configuration
34syntax has a recursive structure and this way allows to create
35configurations with arbitrarily nested sections.
36
37Additionally the configuration syntax provides complex
38single/double/balanced quoting of tokens, hexadecimal/octal/decimal
39character encodings, character escaping, C/C++ and Shell-style
40comments, etc. The library API allows importing a configuration text
41into an Abstract Syntax Tree (AST), traversing the AST and optionally
42exporting the AST again as a configuration text.
43
fc27512a 44%description -l pl.UTF-8
fea57080 45OSSP cfg to biblioteka ISO-C do analizy dowolnych plików
fc27512a
JR
46konfiguracyjnych w stylu C/C++. Konfiguracja jest sekwencją dyrektyw.
47Każ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
49konfiguracji ma strukturę rekurencyjną, co pozwala tworzyć
50konfiguracje z dowolnie zagnieżdżonymi sekcjami.
8d4ab9e0 51
fc27512a
JR
52Składnia konfiguracji udostępnia dodatkowo złożone
53pojedyncze/podwójne/zrównoważone cytowanie tokenów,
54szesnastkowe/ósemkowe/dziesiętne kodowanie znaków, cytowanie znaków,
55komentarze w stylu C/C++ i powłoki itp. API biblioteki umożliwia
56importowanie tekstu konfiguracji do abstrakcyjnych drzew składniowych
8d4ab9e0
JB
57(AST), przechodzenie po AST i opcjonalnie eksportowanie AST z powrotem
58do tekstu konfiguracji.
f9c56c65 59
60%package devel
61Summary: OSSP cfg - Configuration Parsing - header files and development libraries
fea57080 62Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji - pliki nagłówkowe i biblioteki dla deweloperów
f9c56c65 63Group: Development/Libraries
0388d902 64Requires: %{name} = %{version}-%{release}
f9c56c65 65
66%description devel
67OSSP cfg - Configuration Parsing - header files and development
68libraries.
69
fc27512a 70%description devel -l pl.UTF-8
fea57080 71OSSP cfg - analiza konfiguracji - pliki nagłówkowe i biblioteki dla
fc27512a 72deweloperów.
f9c56c65 73
74%package static
75Summary: OSSP cfg - Configuration Parsing - static libraries
fea57080 76Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji - biblioteki statyczne
f9c56c65 77Group: Development/Libraries
0388d902 78Requires: %{name}-devel = %{version}-%{release}
f9c56c65 79
80%description static
81OSSP cfg - Configuration Parsing - static libraries.
82
fc27512a 83%description static -l pl.UTF-8
fea57080 84OSSP cfg - analiza konfiguracji - biblioteki statyczne.
f9c56c65 85
dff71bdc 86%package -n perl-cfg
e5b7c73c 87Summary: OSSP cfg - Configuration Parsing - Perl bindings
fea57080 88Summary(pl.UTF-8): OSSP cfg - analiza konfiguracji - dowiązania Perla
dff71bdc 89Group: Development/Languages/Perl
90
91%description -n perl-cfg
92OSSP cfg - Configuration Parsing - Perl bindings to C API.
93
fc27512a 94%description -n perl-cfg -l pl.UTF-8
fea57080 95OSSP 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}
114cd perl
115%{__perl} Makefile.PL \
116 INSTALLDIRS=vendor
117%{__make} \
118 OPTIMIZE="%{rpmcflags}"
119%endif
120
f9c56c65 121%install
122rm -rf $RPM_BUILD_ROOT
123
124%{__make} install \
dff71bdc 125 DESTDIR=$RPM_BUILD_ROOT \
126 INSTALLDIRS=vendor
f9c56c65 127
128%clean
129rm -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*
This page took 0.117683 seconds and 4 git commands to generate.