0d42696
Name:           debconf
0d42696
Version:        1.5.42
467918d
Release:        5%{?dist}
0d42696
Summary:        Debian configuration management system
0d42696
0d42696
Group:          Development/Tools
0d42696
License:        BSD
0d42696
URL:            http://packages.debian.org/sid/debconf
0d42696
Source0:        http://ftp.de.debian.org/debian/pool/main/d/%{name}/%{name}_%{version}.tar.gz
0d42696
Patch0:         debconf-1.5.32-no-utf8-to-pod2man.patch
0d42696
Patch1:         debconf-1.5.42-python_version_support.patch
0d42696
BuildArch:      noarch
0d42696
0d42696
BuildRequires:  python
0d42696
BuildRequires:  po4a >= 0.23
0d42696
BuildRequires:  gettext >= 0.13
0d42696
BuildRequires:  perl-Qt-devel
0d42696
# Not actual requirements, although listed at
0d42696
# http://ftp.de.debian.org/debian/pool/main/d/debconf/debconf_1.5.32.dsc
0d42696
#BuildRequires:  debhelper >= 7.0.50
0d42696
#BuildRequires:  perl-libintl
0d42696
#BuildRequires:  po-debconf
0d42696
0d42696
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
0d42696
0d42696
%description
0d42696
Debconf is a configuration management system for Debian
0d42696
packages. Packages use Debconf to ask questions when
0d42696
they are installed.
0d42696
0d42696
%package doc
0d42696
Summary:        Debconf documentation
0d42696
Group:          Development/Tools
0d42696
License:        BSD
0d42696
Requires:       %{name} = %{version}-%{release}
0d42696
0d42696
%description doc
0d42696
This package contains lots of additional documentation for Debconf,
0d42696
including the debconf user's guide, documentation about using
0d42696
different backend databases via the /etc/debconf.conf file, and a
0d42696
developer's guide to debconf.
0d42696
0d42696
%package i18n
0d42696
Summary:        Full internationalization support for debconf
0d42696
Group:          Development/Tools
0d42696
License:        BSD
0d42696
Requires:       %{name} = %{version}-%{release}
0d42696
0d42696
%description i18n
0d42696
This package provides full internationalization for debconf,
0d42696
including translations into all available languages, support
0d42696
for using translated debconf templates, and support for
0d42696
proper display of multibyte character sets.
0d42696
0d42696
%package utils
0d42696
Summary:        This package contains some small utilities for debconf developers
0d42696
Group:          Development/Tools
0d42696
License:        BSD
0d42696
Requires:       %{name} = %{version}-%{release}
0d42696
0d42696
%description utils
0d42696
This package contains some small utilities for debconf developers.
0d42696
0d42696
%prep
0d42696
%setup -q
0d42696
%patch0 -p1
0d42696
%patch1 -p1
0d42696
0d42696
0d42696
%build
0d42696
make %{?_smp_mflags}
0d42696
0d42696
%install
0d42696
make install prefix=%{buildroot}
0d42696
make install-i18n prefix=%{buildroot}
0d42696
make install-utils prefix=%{buildroot}
0d42696
0d42696
mkdir -p \
0d42696
        %{buildroot}/%{perl_vendorlib} \
0d42696
        %{buildroot}/%{_mandir}/man{1,3,5,7,8} \
0d42696
        %{buildroot}/%{_mandir}/de/man{1,3,5,7,8} \
0d42696
        %{buildroot}/%{_mandir}/fr/man{1,3,5,7,8} \
0d42696
        %{buildroot}/%{_mandir}/ru/man{1,3,5,7,8} \
0d42696
        %{buildroot}/%{_mandir}/pt_BR/man{1,3,8}
0d42696
0d42696
%if "%{_datadir}/perl5" != "%{perl_vendorlib}"
0d42696
mv %{buildroot}/%{_datadir}/perl5/Debconf %{buildroot}/%{perl_vendorlib}/.
0d42696
mv %{buildroot}/%{_datadir}/perl5/Debian %{buildroot}/%{perl_vendorlib}/.
0d42696
%endif
0d42696
0d42696
chmod 755 %{buildroot}/%{_datadir}/%{name}/confmodule*
0d42696
0d42696
# Base and i18n man pages
0d42696
for man in \
0d42696
        "debconf-apt-progress" \
0d42696
        "debconf-communicate" \
0d42696
        "debconf-copydb" \
0d42696
        "debconf-escape" \
0d42696
        "debconf-set-selections" \
0d42696
        "debconf-show" \
0d42696
        "debconf" \
0d42696
        "dpkg-preconfigure" \
0d42696
        "dpkg-reconfigure"; do
0d42696
0d42696
    for level in 1 8; do
0d42696
        for lang in de fr pt_BR ru; do
dae5544
            if test -f doc/man/gen/$man.$lang.$level; then
dae5544
                short_lang=`echo "$lang" | sed 's/_.*//'`
0d42696
                install -m 644 doc/man/gen/$man.$lang.$level %{buildroot}/%{_mandir}/$lang/man$level/$man.$level
dae5544
                echo "%lang($short_lang) %{_mandir}/$lang/man$level/$man.$level*" >> "man-i18n.lang"
dae5544
            fi
0d42696
        done
0d42696
        test -f doc/man/gen/$man.$level && \
0d42696
            install -m 644 doc/man/gen/$man.$level %{buildroot}/%{_mandir}/man$level/$man.$level
0d42696
    done
0d42696
done
0d42696
0d42696
# Doc foo
0d42696
for man in \
0d42696
        "Debconf::Client::ConfModule" \
0d42696
        "confmodule" \
0d42696
        "debconf.conf" \
0d42696
        "debconf-devel" \
0d42696
        "debconf"; do
0d42696
0d42696
    for level in 3 5 7; do
0d42696
        for lang in de fr pt_BR ru; do
dae5544
            if test -f doc/man/$man.$lang.$level*; then
dae5544
                short_lang=`echo "$lang" | sed 's/_.*//'`
0d42696
                install -m 644 doc/man/$man.$lang.$level* %{buildroot}/%{_mandir}/$lang/man$level/$man.$level
dae5544
                echo "%lang($short_lang) %{_mandir}/$lang/man$level/$man.$level*" >> "man-doc.lang"
dae5544
            fi
0d42696
        done
0d42696
        test -f doc/man/$man.$level && \
0d42696
            install -m 644 doc/man/$man.$level %{buildroot}/%{_mandir}/man$level/$man.$level
0d42696
    done
0d42696
done
0d42696
0d42696
# Utils man pages
0d42696
for man in get-selections \
0d42696
            getlang \
0d42696
            loadtemplate \
0d42696
            mergetemplate; do
0d42696
    for lang in de fr pt_BR ru; do
dae5544
        short_lang=`echo "$lang" | sed 's/_.*//'`
dae5544
        if test -f doc/man/gen/debconf-$man.$lang.1; then
0d42696
            install -m 644 doc/man/gen/debconf-$man.$lang.1 %{buildroot}/%{_mandir}/$lang/man1/debconf-$man.1
dae5544
            echo "%lang($short_lang) %{_mandir}/$lang/man1/debconf-$man.1*" >> "man-utils.lang"
dae5544
        fi
0d42696
    done
0d42696
    test -f doc/man/gen/debconf-$man.1 && \
0d42696
        install -m 644 doc/man/gen/debconf-$man.1 %{buildroot}/%{_mandir}/man1/debconf-$man.1
0d42696
done
0d42696
dae5544
%find_lang debconf
0d42696
dae5544
%files
0d42696
%doc doc/README doc/EXAMPLES doc/CREDITS doc/README.translators doc/README.LDAP doc/TODO
0d42696
%doc debian/changelog debian/copyright debian/README.Debian
0d42696
%config(noreplace) %{_sysconfdir}/debconf.conf
0d42696
%{_bindir}/debconf
0d42696
%{_bindir}/debconf-apt-progress
0d42696
%{_bindir}/debconf-communicate
0d42696
%{_bindir}/debconf-copydb
0d42696
%{_bindir}/debconf-escape
0d42696
%{_bindir}/debconf-set-selections
0d42696
%{_bindir}/debconf-show
0d42696
%{_sbindir}/dpkg-preconfigure
0d42696
%{_sbindir}/dpkg-reconfigure
0d42696
%{python_sitelib}/debconf.*
dae5544
%exclude /usr/lib/python3
0d42696
%{perl_vendorlib}/Debconf
0d42696
%{perl_vendorlib}/Debian
0d42696
%{_datadir}/%{name}
0d42696
%{_mandir}/man1/debconf-apt-progress.1*
0d42696
%{_mandir}/man1/debconf-communicate.1*
0d42696
%{_mandir}/man1/debconf-copydb.1*
0d42696
%{_mandir}/man1/debconf-escape.1*
0d42696
%{_mandir}/man1/debconf-set-selections.1*
0d42696
%{_mandir}/man1/debconf-show.1*
0d42696
%{_mandir}/man1/debconf.1*
0d42696
%{_mandir}/man8/dpkg-preconfigure.8*
0d42696
%{_mandir}/man8/dpkg-reconfigure.8*
0d42696
%{_datadir}/pixmaps/debian-logo.png
0d42696
dae5544
%files doc -f man-doc.lang
0d42696
%doc samples/
0d42696
%doc doc/CREDITS doc/README doc/README.LDAP doc/TODO
0d42696
%doc debian/changelog
0d42696
%doc debian/copyright
0d42696
%doc doc/debconf.schema
0d42696
%doc doc/hierarchy.txt
0d42696
%doc doc/namespace.txt
0d42696
%doc doc/passthrough.txt
0d42696
%{_mandir}/man3/confmodule.3*
0d42696
%{_mandir}/man5/debconf.conf.5*
0d42696
%{_mandir}/man7/debconf-devel.7*
0d42696
%{_mandir}/man7/debconf.7*
0d42696
dae5544
%files i18n -f man-i18n.lang -f debconf.lang
0d42696
%doc debian/changelog debian/copyright debian/README.Debian
dae5544
dae5544
%files utils -f man-utils.lang
0d42696
%doc debian/changelog debian/copyright debian/README.Debian
0d42696
%{_bindir}/debconf-get-selections
0d42696
%{_bindir}/debconf-getlang
0d42696
%{_bindir}/debconf-loadtemplate
0d42696
%{_bindir}/debconf-mergetemplate
0d42696
%{_mandir}/man1/debconf-get-selections.1*
0d42696
%{_mandir}/man1/debconf-getlang.1*
0d42696
%{_mandir}/man1/debconf-loadtemplate.1*
0d42696
%{_mandir}/man1/debconf-mergetemplate.1*
0d42696
0d42696
%changelog
467918d
* Sun May 13 2012 Oron Peled <oron@actcom.co.il> - 1.5.42-5
467918d
- Bump release to match f17, f16 builds
467918d
dae5544
* Sat May 12 2012 Oron Peled <oron@actcom.co.il> - 1.5.42-4
dae5544
- Fix find_lang for man-pages. It is not smart enough to do
dae5544
  it all in one swoop. So we generate the expected results
dae5544
  manually (during installation)
dae5544
- Fix exclude of python3 (picked wrong directory on x86-64
dae5544
0d42696
* Tue May  1 2012 Oron Peled <oron@actcom.co.il> - 1.5.42-3
0d42696
- Added --with-man and --all-name to find_lang
0d42696
- Use wild-cards for language directories of man-pages 
0d42696
0d42696
* Thu Apr 12 2012 Oron Peled <oron@actcom.co.il> - 1.5.42-2
0d42696
- Added find_lang stuff
0d42696
- Don't specify man-pages compression
0d42696
- Added BR python
0d42696
- Added BR perl-Qt (for KDE frontend)
0d42696
0d42696
* Mon Mar 26 2012 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.5.42-1
0d42696
- New upstream version
0d42696
0d42696
* Tue Sep  7 2010 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 1.5.32-4
0d42696
- Fix available python interpreters (4)
0d42696
- Fix %%install (4)
0d42696
- Fix build requirements (3)
0d42696
- Include doc, i18n and utils packages (2)
0d42696
- First package (1)