b38f24d861d54e59b4467e4674a83c1c25b6b029
[gentoo.git] / app-i18n / man-pages-de / man-pages-de-2.12-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools
7
8 MY_P="${PN/-/}-v${PV}"
9
10 DESCRIPTION="A somewhat comprehensive collection of Linux german man page translations"
11 HOMEPAGE="https://salsa.debian.org/manpages-de-team/manpages-de"
12 SRC_URI="https://salsa.debian.org/manpages-de-team/manpages-de/-/archive/v${PV}/${MY_P}.tar.bz2"
13
14 LICENSE="GPL-3+ man-pages GPL-2+ GPL-2 BSD"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86"
17 IUSE=""
18
19 RDEPEND="virtual/man"
20 BDEPEND="app-text/po4a"
21
22 S="${WORKDIR}/${MY_P}"
23
24 src_prepare() {
25         default
26
27         sed '/gzip --best/d' -i po/Makefile.am || die
28
29         # sys-apps/shadow has it's own translated man-page for this
30         local manpage
31         local noinst_manpages=(
32                 upstream/debian-unstable/man1/groups.1
33                 po/man1/free.1.po
34                 po/man1/groups.1.po
35                 po/man1/su.1.po
36                 po/man1/uptime.1.po
37         )
38         for manpage in ${noinst_manpages[@]} ; do
39                 rm "${manpage}" || die
40         done
41
42         # Use the same compression as every other manpage
43         local PORTAGE_COMPRESS_LOCAL=${PORTAGE_COMPRESS-bzip2}
44         local PORTAGE_COMPRESS_FLAGS_LOCAL=${PORTAGE_COMPRESS_FLAGS}
45         if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
46                 case ${PORTAGE_COMPRESS_LOCAL} in
47                         bzip2|gzip)
48                                 PORTAGE_COMPRESS_FLAGS_LOCAL="-9"
49                         ;;
50                 esac
51         fi
52
53         # Fix source files for symlinks
54         local LINKSOURCE
55         case ${PORTAGE_COMPRESS_LOCAL} in
56                 bzip2)
57                         for LINKSOURCE in upstream/*/links.txt ; do
58                                 sed -i -e 's/\.gz/\.bz2/g' "${LINKSOURCE}" || die
59                         done
60                 ;;
61                 gzip)
62                         # pass
63                 ;;
64                 xz)
65                         for LINKSOURCE in upstream/*/links.txt ; do
66                                 sed -i -e 's/\.gz/\.xz/g' "${LINKSOURCE}" || die
67                         done
68                 ;;
69                 *)
70                         ewarn "Unexpected compression command ${PORTAGE_COMPRESS} found, symlinks will not work."
71                 ;;
72         esac
73
74         eautoreconf
75 }
76
77 src_compile() { :; }
78
79 src_install() {
80         emake mandir="${ED}"/usr/share/man install
81         dodoc CHANGES.md README.md
82 }