Blob Blame History Raw
Name:           debconf
Version:        1.5.42
Release:        5%{?dist}
Summary:        Debian configuration management system

Group:          Development/Tools
License:        BSD
Patch0:         debconf-1.5.32-no-utf8-to-pod2man.patch
Patch1:         debconf-1.5.42-python_version_support.patch
BuildArch:      noarch

BuildRequires:  python
BuildRequires:  po4a >= 0.23
BuildRequires:  gettext >= 0.13
BuildRequires:  perl-Qt-devel
# Not actual requirements, although listed at
#BuildRequires:  debhelper >= 7.0.50
#BuildRequires:  perl-libintl
#BuildRequires:  po-debconf

Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

Debconf is a configuration management system for Debian
packages. Packages use Debconf to ask questions when
they are installed.

%package doc
Summary:        Debconf documentation
Group:          Development/Tools
License:        BSD
Requires:       %{name} = %{version}-%{release}

%description doc
This package contains lots of additional documentation for Debconf,
including the debconf user's guide, documentation about using
different backend databases via the /etc/debconf.conf file, and a
developer's guide to debconf.

%package i18n
Summary:        Full internationalization support for debconf
Group:          Development/Tools
License:        BSD
Requires:       %{name} = %{version}-%{release}

%description i18n
This package provides full internationalization for debconf,
including translations into all available languages, support
for using translated debconf templates, and support for
proper display of multibyte character sets.

%package utils
Summary:        This package contains some small utilities for debconf developers
Group:          Development/Tools
License:        BSD
Requires:       %{name} = %{version}-%{release}

%description utils
This package contains some small utilities for debconf developers.

%setup -q
%patch0 -p1
%patch1 -p1

make %{?_smp_mflags}

make install prefix=%{buildroot}
make install-i18n prefix=%{buildroot}
make install-utils prefix=%{buildroot}

mkdir -p \
        %{buildroot}/%{perl_vendorlib} \
        %{buildroot}/%{_mandir}/man{1,3,5,7,8} \
        %{buildroot}/%{_mandir}/de/man{1,3,5,7,8} \
        %{buildroot}/%{_mandir}/fr/man{1,3,5,7,8} \
        %{buildroot}/%{_mandir}/ru/man{1,3,5,7,8} \

%if "%{_datadir}/perl5" != "%{perl_vendorlib}"
mv %{buildroot}/%{_datadir}/perl5/Debconf %{buildroot}/%{perl_vendorlib}/.
mv %{buildroot}/%{_datadir}/perl5/Debian %{buildroot}/%{perl_vendorlib}/.

chmod 755 %{buildroot}/%{_datadir}/%{name}/confmodule*

# Base and i18n man pages
for man in \
        "debconf-apt-progress" \
        "debconf-communicate" \
        "debconf-copydb" \
        "debconf-escape" \
        "debconf-set-selections" \
        "debconf-show" \
        "debconf" \
        "dpkg-preconfigure" \
        "dpkg-reconfigure"; do

    for level in 1 8; do
        for lang in de fr pt_BR ru; do
            if test -f doc/man/gen/$man.$lang.$level; then
                short_lang=`echo "$lang" | sed 's/_.*//'`
                install -m 644 doc/man/gen/$man.$lang.$level %{buildroot}/%{_mandir}/$lang/man$level/$man.$level
                echo "%lang($short_lang) %{_mandir}/$lang/man$level/$man.$level*" >> "man-i18n.lang"
        test -f doc/man/gen/$man.$level && \
            install -m 644 doc/man/gen/$man.$level %{buildroot}/%{_mandir}/man$level/$man.$level

# Doc foo
for man in \
        "Debconf::Client::ConfModule" \
        "confmodule" \
        "debconf.conf" \
        "debconf-devel" \
        "debconf"; do

    for level in 3 5 7; do
        for lang in de fr pt_BR ru; do
            if test -f doc/man/$man.$lang.$level*; then
                short_lang=`echo "$lang" | sed 's/_.*//'`
                install -m 644 doc/man/$man.$lang.$level* %{buildroot}/%{_mandir}/$lang/man$level/$man.$level
                echo "%lang($short_lang) %{_mandir}/$lang/man$level/$man.$level*" >> "man-doc.lang"
        test -f doc/man/$man.$level && \
            install -m 644 doc/man/$man.$level %{buildroot}/%{_mandir}/man$level/$man.$level

# Utils man pages
for man in get-selections \
            getlang \
            loadtemplate \
            mergetemplate; do
    for lang in de fr pt_BR ru; do
        short_lang=`echo "$lang" | sed 's/_.*//'`
        if test -f doc/man/gen/debconf-$man.$lang.1; then
            install -m 644 doc/man/gen/debconf-$man.$lang.1 %{buildroot}/%{_mandir}/$lang/man1/debconf-$man.1
            echo "%lang($short_lang) %{_mandir}/$lang/man1/debconf-$man.1*" >> "man-utils.lang"
    test -f doc/man/gen/debconf-$man.1 && \
        install -m 644 doc/man/gen/debconf-$man.1 %{buildroot}/%{_mandir}/man1/debconf-$man.1

%find_lang debconf

%doc doc/README doc/EXAMPLES doc/CREDITS doc/README.translators doc/README.LDAP doc/TODO
%doc debian/changelog debian/copyright debian/README.Debian
%config(noreplace) %{_sysconfdir}/debconf.conf
%exclude /usr/lib/python3

%files doc -f man-doc.lang
%doc samples/
%doc debian/changelog
%doc debian/copyright
%doc doc/debconf.schema
%doc doc/hierarchy.txt
%doc doc/namespace.txt
%doc doc/passthrough.txt

%files i18n -f man-i18n.lang -f debconf.lang
%doc debian/changelog debian/copyright debian/README.Debian

%files utils -f man-utils.lang
%doc debian/changelog debian/copyright debian/README.Debian

* Sun May 13 2012 Oron Peled <> - 1.5.42-5
- Bump release to match f17, f16 builds

* Sat May 12 2012 Oron Peled <> - 1.5.42-4
- Fix find_lang for man-pages. It is not smart enough to do
  it all in one swoop. So we generate the expected results
  manually (during installation)
- Fix exclude of python3 (picked wrong directory on x86-64

* Tue May  1 2012 Oron Peled <> - 1.5.42-3
- Added --with-man and --all-name to find_lang
- Use wild-cards for language directories of man-pages 

* Thu Apr 12 2012 Oron Peled <> - 1.5.42-2
- Added find_lang stuff
- Don't specify man-pages compression
- Added BR python
- Added BR perl-Qt (for KDE frontend)

* Mon Mar 26 2012 Jeroen van Meeuwen <> - 1.5.42-1
- New upstream version

* Tue Sep  7 2010 Jeroen van Meeuwen <> - 1.5.32-4
- Fix available python interpreters (4)
- Fix %%install (4)
- Fix build requirements (3)
- Include doc, i18n and utils packages (2)
- First package (1)