Bump to 1.14.1
[platform/upstream/augeas.git] / packaging / augeas.spec
1 %define _unpackaged_files_terminate_build 0
2 %define debug_package %{nil}
3
4 Name:           augeas
5 Version:        1.14.1
6 Release:        0
7 Summary:        A library for changing configuration files
8 License:        LGPL-2.1+
9 Group:          System/Libraries
10 Url:            http://augeas.net/
11 Source0:        http://augeas.net/download/augeas-%{version}.tar.gz
12 Source1:        baselibs.conf
13 Source2:        gnulib.tar.gz
14 Source3:        Fix_bootstrap_for_build.patch
15 Source4:        Add_parser.h_to_Makefile.patch
16 Source1001:     augeas.manifest
17
18 BuildRequires:  glib2-devel
19 BuildRequires:  libxml2-devel
20 BuildRequires:  readline-devel
21 BuildRequires:  flex
22 BuildRequires:  bison
23
24 %description
25 A library for programmatically editing configuration files. Augeas parses
26 configuration files into a tree structure, which it exposes through its
27 public API. Changes made through the API are written back to the initially
28 read files.
29
30 The transformation works very hard to preserve comments and formatting
31 details. It is controlled by ``lens'' definitions that describe the file
32 format and the transformation into a tree.
33
34 %package        devel
35 Summary:        A library for changing configuration files
36 Group:          System/Development
37 Requires:       %{name}-libs = %{version}
38 Requires:       pkgconfig
39
40 %description    devel
41 The %{name}-devel package contains libraries and header files for
42 developing applications that use %{name}.
43
44
45 %package        libs
46 Summary:        Libraries for %{name}
47 Group:          System/Libraries
48
49 %description    libs
50 The libraries for %{name}.
51
52 Augeas is a library for programmatically editing configuration files. It parses
53 configuration files into a tree structure, which it exposes through its
54 public API. Changes made through the API are written back to the initially
55 read files.
56
57 %prep
58 %setup -q
59 cp %{SOURCE1001} .
60 tar -zxvf %{SOURCE2}
61 %{__patch} -p1 < %{SOURCE3}
62 %{__patch} -p1 < %{SOURCE4}
63
64 %build
65 ./autogen.sh  --gnulib-srcdir=%{_builddir}/%{?buildsubdir}/gnulib --prefix=%{_prefix} --disable-static --libdir=%{_libdir}
66 make %{?_smp_mflags}
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p"
71 find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
72
73 # The tests/ subdirectory contains lenses used only for testing, and
74 # so it shouldn't be packaged.
75 rm -r $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/dist/tests
76
77 %remove_docs
78
79 %check
80 #pushd ./gnulib/tests/
81 #chmod +x *.sh
82 #popd
83 #%{__make} check || exit 0
84
85 %post libs -p /sbin/ldconfig
86
87 %postun libs -p /sbin/ldconfig
88
89 %files
90 %manifest %{name}.manifest
91 %{_bindir}/augtool
92 %{_bindir}/augparse
93 %{_bindir}/fadot
94 %{_datadir}/vim/vimfiles/syntax/augeas.vim
95 %{_datadir}/vim/vimfiles/ftdetect/augeas.vim
96
97 %files libs
98 %manifest %{name}.manifest
99 # %{_datadir}/augeas and %{_datadir}/augeas/lenses are owned
100 # by filesystem.
101 %{_datadir}/augeas/lenses/dist
102 %{_libdir}/*.so.*
103 %license COPYING
104
105 %files devel
106 %manifest %{name}.manifest
107 %{_includedir}/*
108 %{_libdir}/*.so
109 %{_libdir}/pkgconfig/augeas.pc