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