blob: 6d796562a9f5d09d7309831c37955ffd0eab2e17 (
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
|
# Maintainer mattf <matheusfillipeag@gmail.com>
pkgname=curl-impersonate-firefox
pkgver=1.2.2
pkgrel=1
pkgdesc="A special compilation of curl that makes it impersonate Firefox"
url="https://github.com/lexiforest/curl-impersonate"
license=('MIT')
arch=('x86_64' 'i686' 'aarch64' 'armv7h')
makedepends=(tar gcc cmake go ninja unzip zlib autoconf automake libtool patch)
depends=(nss libc++)
provides=(curl-impersonate-firefox libcurl-impersonate-firefox)
# WORKAROUND for building brotli
options=("!buildflags")
source=(
"curl-impersonate-${pkgver}.tar.gz::https://github.com/lexiforest/curl-impersonate/archive/refs/tags/v${pkgver}.tar.gz"
)
md5sums=('30653529e4fa45ea97c845fd2518151d')
prepare () {
export CXXFLAGS+=" -Wno-error=stringop-overflow"
cd curl-impersonate-${pkgver}
autoconf
mkdir -p build
cd build
../configure --prefix="${pkgdir}/usr"
make build -j1
}
package () {
mkdir -p "${pkgdir}/usr"
cd curl-impersonate-${pkgver}/build
make install
# Only keep curl-impersonate* and curl_firefox*
find -L "${pkgdir}/usr/bin" -type f ! -iname "curl-impersonate*" ! -iname "curl_firefox*" -print0 | xargs -0r -I@ -- rm -vf "@"
# Cleanup libcurl
find -L "${pkgdir}/usr/lib" -type f ! -iname "lib*.so*" -print0 | xargs -0r -I@ -- rm -vf "@"
chown -R root:root "${pkgdir}/usr/lib/"
}
|