]> git.pld-linux.org Git - packages/cfg.git/blob - cfg.spec
- do not define epoch 0
[packages/cfg.git] / cfg.spec
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
5 #
6 # Conditional builds:
7 %bcond_with     ex      # build with external OSSP ex library
8 %bcond_without  perl    # build Perl bindings to C API
9 #
10 Summary:        OSSP cfg - Configuration Parsing
11 Summary(pl.UTF-8):      OSSP cfg - analiza konfiguracji
12 Name:           cfg
13 Version:        0.9.11
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
18 # Source0-md5:  28bccd084b64b045b3e19eea54e001b6
19 URL:            http://www.ossp.org/pkg/lib/cfg/
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 BuildRequires:  bison
23 %{?with_ex:BuildRequires:       ex-devel}
24 BuildRequires:  flex
25 BuildRequires:  libtool
26 %{?with_perl:BuildRequires:     perl-devel}
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
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.
51
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.
59
60 %package devel
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}
65
66 %description devel
67 OSSP cfg - Configuration Parsing - header files and development
68 libraries.
69
70 %description devel -l pl.UTF-8
71 OSSP cfg - analiza konfiguracji - pliki nagłówkowe i biblioteki dla
72 deweloperów.
73
74 %package static
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}
79
80 %description static
81 OSSP cfg - Configuration Parsing - static libraries.
82
83 %description static -l pl.UTF-8
84 OSSP cfg - analiza konfiguracji - biblioteki statyczne.
85
86 %package -n perl-cfg
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
90
91 %description -n perl-cfg
92 OSSP cfg - Configuration Parsing - Perl bindings to C API.
93
94 %description -n perl-cfg -l pl.UTF-8
95 OSSP cfg - analiza konfiguracji - dowiązania Perla do API C.
96
97 %prep
98 %setup -q
99
100 %build
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
111 %{__make}
112
113 %if %{with_perl}
114 cd perl
115 %{__perl} Makefile.PL \
116         INSTALLDIRS=vendor
117 %{__make} \
118         OPTIMIZE="%{rpmcflags}"
119 %endif
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123
124 %{__make} install \
125         DESTDIR=$RPM_BUILD_ROOT \
126         INSTALLDIRS=vendor
127
128 %clean
129 rm -rf $RPM_BUILD_ROOT
130
131 %post   -p /sbin/ldconfig
132 %postun -p /sbin/ldconfig
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}/*
145 %{_mandir}/man3/cfg.3*
146
147 %files static
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_libdir}/lib*.a
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
159 %{_mandir}/man3/OSSP::cfg.3pm*
This page took 0.068054 seconds and 3 git commands to generate.