blob: 3d4933ddf4480616069b8aa8841a6245c427771a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
# Maintainer: Sean Anderson <seanga2@gmail.com>
pkgname=lintian
pkgver=2.119.0
pkgrel=1
pkgdesc="dissects Debian packages and tries to find bugs and policy violations"
arch=(any)
url="https://lintian.debian.org/"
license=('GPL2')
depends=(
appstream
perl
perl-aptpkg
perl-berkeleydb
perl-config-tiny
perl-data-dpath
perl-data-validate-domain
perl-data-validate-uri
perl-devel-size
perl-email-address-xs
perl-file-find-rule
perl-font-ttf
perl-html-tokeparser-simple
perl-io-interactive
perl-json-maybexs
perl-list-someutils
perl-list-utilsby
perl-mldbm
perl-moox-aliases
perl-namespace-clean
perl-path-tiny
perl-perlio-gzip
perl-perlio-utf8-strict
perl-proc-processtable
perl-regexp-wildcards
perl-syntax-keyword-try
perl-term-readkey
perl-text-levenshteinxs
perl-text-markdown-discount
perl-text-xslate
perl-time-duration
perl-time-moment
perl-version
perl-www-mechanize
perl-xml-libxml
perl-yaml-libyaml
)
makedepends=(
perl-const-fast
perl-file-basedir
perl-html-html5-entities
perl-ipc-run3
perl-unicode-utf8
python-docutils
)
#checkdepends=(
# aspell-en
# perl-berkeleydb
# perl-html-tokeparser-simple
# perl-io-prompt-tiny
# perl-mce
# perl-mldbm
# perl-pod-coverage-trustpod
# perl-test-minimumversion
# perl-test-pod-coverage
# perl-test-strict
# perl-test-synopsis
# perl-text-csv
# perl-text-diff
# perl-text-markdown-discount
# perl-www-mechanize
# tidy
#)
optdepends=()
options=('!emptydirs' purge)
source=("https://salsa.debian.org/lintian/$pkgname/-/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('12869520c06dbe399189ad4c17dd93bae7b842a265844de893a0436c69f9500f10495ef4df3566b04e86802898d70136218df7ecb85fc72961c8f1c99b1d6a72')
prepare() {
cd "$pkgname-$pkgver"
#mkdir -p profiles/archlinux
#cat <<- EOF > profiles/archlinux/main.profile
# Profile: archlinux/main
# Extends: debian/main
# Disable-Tags:
# bugs-field-does-not-refer-to-debian-infrastructure
#EOF
/usr/bin/perl -p -i -e "s/my \\\$LINTIAN_VERSION;/my \\\$LINTIAN_VERSION = q{${pkgver}};/;" bin/*
}
build() {
cd "$pkgname-$pkgver"
podargs=(--center "Debian Package Checker" --release "Lintian v${pkgver}")
( cd doc && LC_ALL=en_US.UTF-8 rst2html lintian.rst > lintian.html )
mkdir -p man/man1/ man/man3/
pod2man "${podargs[@]}" --name lintian --section=1 man/lintian.pod > man/man1/lintian.1
for POD in man/*.pod; do
BASENAME=$(basename "$POD" .pod)
pod2man "${podargs[@]}" --section=1 "$POD" > "man/man1/$BASENAME".1
done
for POD in $(find doc/tutorial lib/Lintian lib/Test -type f '!' -path '*/Output/*' '!' -path '*/Check/*' '!' -path '*/Screen/*'); do
BASENAME=$(echo "$POD" | perl -pe 's@^(doc/tutorial|lib)/@@; s@/@::@g; s/\.(pod|pm)$$//')
pod2man "${podargs[@]}" --name="$BASENAME" --section=3 "$POD" > "man/man3/$BASENAME".3
done
private/generate-html-docs doc/api.html
}
check() {
cd "$pkgname-$pkgver"
#private/runtests
}
package() {
cd "$pkgname-$pkgver"
_dir="$pkgdir/usr/share/lintian"
mkdir -p "$pkgdir/etc" "$pkgdir/usr/bin" "$_dir"
for dir in bin data lib .perlcriticrc profiles tags templates vendors; do
cp -a $dir "$_dir"
done
install -Dt "$_dir/private/" private/latest-policy-version
for binary in lintian lintian-explain-tags lintian-annotate-hints spellintian; do
ln -rs "$_dir/bin/$binary" "$pkgdir/usr/bin/$binary"
done
ln -rs "$_dir/bin/lintian-annotate-hints" "$pkgdir/usr/bin/lintian-info"
# Now for docs
_doc="$pkgdir/usr/share/doc/lintian"
mkdir -p "$_doc"
cp -a README.md "$_doc/"
for file in CREDITS api.html lintian.html lintian.rst; do
cp -a doc/$file "$_doc/"
done
ln -rs "$_doc/lintian.rst" "$_doc/lintian.txt"
mkdir -p "$pkgdir/usr/share/man/"
cp -a man/man{1,3} "$pkgdir/usr/share/man/"
}
|