1SUMMARY="An offline browser utility"
2DESCRIPTION="HTTrack is an offline browser utility, allowing you to download a World Wide \
3website from the Internet to a local directory, building recursively all directories, \
4getting html, images, and other files from the server to your computer.
5
6HTTrack arranges the original site's relative link-structure. Simply open a page of \
7the \"mirrored\" website in your browser, and you can browse the site from link to link, \
8as if you were viewing it online.
9
10HTTrack can also update an existing mirrored site, and resume interrupted downloads. \
11HTTrack is fully configurable, and has an integrated help system."
12HOMEPAGE="https://www.httrack.com/"
13COPYRIGHT="Xavier Roche"
14LICENSE="GNU GPL v3"
15REVISION="4"
16SOURCE_URI="https://mirror.httrack.com/httrack-$portVersion.tar.gz"
17CHECKSUM_SHA256="3477a0e5568e241c63c9899accbfcdb6aadef2812fcce0173688567b4c7d4025"
18SOURCE_DIR="httrack-$portVersion"
19PATCHES="httrack-$portVersion.patchset"
20
21ARCHITECTURES="all !x86_gcc2"
22SECONDARY_ARCHITECTURES="x86"
23
24commandSuffix=$secondaryArchSuffix
25commandBinDir=$binDir
26if [ "$targetArchitecture" = x86_gcc2 ]; then
27	commandSuffix=
28	commandBinDir=$prefix/bin
29fi
30
31libVersion="2.0.49"
32
33PROVIDES="
34	httrack$secondaryArchSuffix = $portVersion
35	cmd:webhttrack$commandSuffix = $portVersion
36	cmd:proxytrack$commandSuffix = $portVersion
37	cmd:httrack$commandSuffix = $portVersion
38	cmd:htsserver$commandSuffix = $portVersion
39	lib:libhttrack$secondaryArchSuffix = $libVersion compat >= 2
40	lib:libhtsjava$secondaryArchSuffix = $libVersion compat >= 2
41	"
42REQUIRES="
43	haiku$secondaryArchSuffix
44	lib:libcrypto$secondaryArchSuffix
45	lib:libiconv$secondaryArchSuffix
46	lib:libintl$secondaryArchSuffix
47	lib:libssl$secondaryArchSuffix
48	lib:libz$secondaryArchSuffix
49	"
50
51PROVIDES_devel="
52	httrack${secondaryArchSuffix}_devel = $portVersion
53	devel:libhttrack$secondaryArchSuffix = $libVersion compat >= 2
54	devel:libhtsjava$secondaryArchSuffix = $libVersion compat >= 2
55	"
56REQUIRES_devel="
57	httrack${secondaryArchSuffix} == $portVersion base
58	"
59
60BUILD_REQUIRES="
61	haiku${secondaryArchSuffix}_devel
62	devel:libcrypto$secondaryArchSuffix
63	devel:libiconv$secondaryArchSuffix
64	devel:libintl$secondaryArchSuffix
65	devel:libssl$secondaryArchSuffix
66	devel:libz$secondaryArchSuffix
67	"
68BUILD_PREREQUIRES="
69	cmd:gawk
70	cmd:gcc$secondaryArchSuffix
71	cmd:ld$secondaryArchSuffix
72	cmd:make
73	"
74
75BUILD()
76{
77	export LIBS="-lnetwork -liconv"
78	runConfigure ./configure \
79		--bindir=$commandBinDir \
80		--enable-static=no \
81		--enable-https=yes
82	make $jobArgs
83}
84
85INSTALL()
86{
87	make install
88
89	rm -rf $libDir/*.la \
90		$libDir/httrack/*.la \
91		$prefix/share
92
93	prepareInstalledDevelLibs libhttrack libhtsjava
94	fixPkgconfig
95
96	# devel package
97	packageEntries devel \
98		$developDir
99}
100