97edc9128b8c5269862b0efb2d2a0a5c2fdf3a01
[platform/upstream/autogen.git] / packaging / autogen.spec
1 Name:           autogen
2 BuildRequires:  xz
3 BuildRequires:  m4 >= 1.4.6
4 BuildRequires:  guile guile-devel libguile guile-modules gmp-devel
5 BuildRequires:  libgc-devel-static libffi-devel-static
6 BuildRequires:  libunistring-devel-static
7 Url:            http://www.gnu.org/software/autogen
8 Requires:       m4 >= 1.4.6
9 Requires:       perl >= 5.6
10 Requires:       guile
11 Version:        5.18.16
12 Release:        0
13 Summary:        A GNU Tool for Automatically Configuring Source Code
14 License:        GPL-3.0+
15 Group:          Development/Tools/Building
16 Source:         %{name}-%{version}.tar.gz
17 Source1001:     %{name}.manifest
18
19 %description
20 AutoGen is a tool designed to simplify the creation and maintenance of programs that contain large amounts of repetitious text. It is especially valuable in programs that have several blocks of text that must be kept synchronized.
21
22 AutoGen will accept either its own definition format, or XML files as definition input, in addition to CGI data (for producing dynamic HTML) and traditional AutoGen definitions.
23
24 A common example where this would be useful is in creating and maintaining the code required for processing program options. Processing options requires multiple constructs to be maintained in parallel in different places in your program. Options maintenance needs to be done countless times. So, AutoGen comes with an add-on package named AutoOpts that simplifies the maintenance and documentation of program options.
25
26 %prep
27 %setup -q -n %{name}-%{version}
28 cp %{SOURCE1001} .
29
30 %build
31 export PKG_CONFIG="pkg-config --static"
32 export GUILE_LINK=$(guile-config link --static | sed -e 's|[[:space:]][^[:space:]]\+libunistring.so[^[:space:]]*[[:space:]]| -lunistring |')
33
34 %reconfigure --disable-dependency-tracking \
35              --enable-static --disable-shared \
36              GUILE_LIBS="-Wl,--whole-archive -Wl,--allow-multiple-definition ${GUILE_LINK} -Wl,--no-whole-archive" \
37              CFLAGS="-Wno-error=format-overflow"
38 %{__make} %{?_smp_mflags} V=1
39
40 %check
41 %{?run_tests:
42   trap 'test $? -ne 0 && cat tests/testsuite.log' EXIT
43   %{__make} check
44 }
45
46 %install
47 %{?make_install} %{!?make_install:%{__make} install DESTDIR=%{buildroot}}
48
49 %find_docs
50
51 %remove_docs
52
53 %files
54 %defattr(-,root,root)
55 %manifest %{name}.manifest
56 %{_prefix}/bin/*
57 %{_prefix}/share/%{name}
58 %{_includedir}/autoopts/*
59 #%{_libdir}/*
60 %{_datadir}/aclocal/autoopts.m4
61 %{_libdir}/pkgconfig/autoopts.pc
62 %{_libdir}/autogen/tpl-config.tlib
63
64 %changelog