]> git.pld-linux.org Git - packages/cfg.git/blob - cfg.spec
- perl-cfg desc fixes
[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):    OSSP cfg - parsowanie konfiguracji
12 Name:           cfg
13 Version:        0.9.9
14 Release:        0.1
15 Epoch:          0
16 License:        distributable (see README)
17 Group:          Libraries
18 Source0:        ftp://ftp.ossp.org/pkg/lib/cfg/%{name}-%{version}.tar.gz
19 # Source0-md5:  66576d4d4ee01b29666aa19aaa3faa71        
20 URL:            http://www.ossp.org/pkg/lib/cfg/
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  bison
24 %{?with_ex:BuildRequires:       ex-devel}
25 BuildRequires:  flex    
26 BuildRequires:  libtool
27 %{?with_perl:BuildRequires:     perl-devel}
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
45 %description -l pl
46 OSSP cfg to biblioteka ISO-C do parsowania dowolnych plików
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.
52
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
58 (AST), przechodzenie po AST i opcjonalnie eksportowanie AST z powrotem
59 do tekstu konfiguracji.
60
61 %package devel
62 Summary:        OSSP cfg - Configuration Parsing - header files and development libraries
63 Summary(pl):    OSSP cfg - parsowanie konfiguracji - pliki nag³ówkowe i biblioteki dla deweloperów
64 Group:          Development/Libraries
65 Requires:       %{name} = %{epoch}:%{version}-%{release}
66
67 %description devel
68 OSSP cfg - Configuration Parsing - header files and development
69 libraries.
70
71 %description devel -l pl
72 OSSP cfg - parsowanie konfiguracji - pliki nag³ówkowe i biblioteki dla
73 deweloperów.
74
75 %package static
76 Summary:        OSSP cfg - Configuration Parsing - static libraries
77 Summary(pl):    OSSP cfg - parsowanie konfiguracji - biblioteki statyczne
78 Group:          Development/Libraries
79 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
80
81 %description static
82 OSSP cfg - Configuration Parsing - static libraries.
83
84 %description static -l pl
85 OSSP cfg - parsowanie konfiguracji - biblioteki statyczne.
86
87 %package -n perl-cfg
88 Summary:        OSSP cfg - Configuration Parsing - Perl bindings
89 Summary(pl):    OSSP cfg - parsowanie konfiguracji - dowi±zania Perla
90 Group:          Development/Languages/Perl
91
92 %description -n perl-cfg
93 OSSP cfg - Configuration Parsing - Perl bindings to C API.
94
95 %description -n perl-cfg -l pl
96 OSSP cfg - parsowanie konfiguracji - dowi±zania Perla do API C.
97
98 %prep
99 %setup -q
100
101 %build 
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
112 %{__make}
113
114 %if %{with_perl}
115 cd perl
116 %{__perl} Makefile.PL \
117         INSTALLDIRS=vendor
118 %{__make} \
119         OPTIMIZE="%{rpmcflags}"
120 %endif
121
122 %install
123 rm -rf $RPM_BUILD_ROOT
124
125 %{__make} install \
126         DESTDIR=$RPM_BUILD_ROOT \
127         INSTALLDIRS=vendor
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %post   -p /sbin/ldconfig
133 %postun -p /sbin/ldconfig
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}/*
146 %{_mandir}/man3/cfg.3*
147
148 %files static
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/lib*.a
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
160 %{_mandir}/man3/OSSP::cfg.3pm*
This page took 0.05166 seconds and 3 git commands to generate.