diff options
author | matheusfillipe | 2022-03-04 01:46:41 -0300 |
---|---|---|
committer | matheusfillipe | 2022-03-04 01:46:41 -0300 |
commit | c7acf3922eb2c9164e21b6405b1d267865ba32be (patch) | |
tree | 6914429cb0f1febc150cdc3d9a697e3aa5cb5011 | |
parent | fc9e376dd2da5d64719d65afeb9d81dad5efe664 (diff) | |
download | aur-c7acf3922eb2c9164e21b6405b1d267865ba32be.tar.gz |
build libcurl.so
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 28 |
2 files changed, 27 insertions, 3 deletions
@@ -1,6 +1,6 @@ pkgbase = curl-impersonate-chrome pkgdesc = A special compilation of curl that makes it impersonate Chrome - pkgver = r24.051ccfd + pkgver = r59.979750a pkgrel = 1 url = https://github.com/lwthiker/curl-impersonate arch = x86_64 @@ -1,7 +1,7 @@ # Maintainer mattf <matheusfillipeag@gmail.com> pkgname=curl-impersonate-chrome -pkgver=r24.051ccfd +pkgver=r59.979750a _gitname=curl-impersonate pkgrel=1 pkgdesc="A special compilation of curl that makes it impersonate Chrome" @@ -99,9 +99,21 @@ build_curl () { mkdir -p out cp src/curl out/curl-impersonate cp ${srcdir}/${browser_dir}/curl_* out/ + strip out/curl-impersonate chmod +x out/* } +build_libcurl () { + cd ${srcdir} + cd ${CURL_VERSION} + ./configure --with-openssl=${srcdir}/${BORING_SSL_DIR}/build --with-nghttp2=${srcdir}/${NGHTTP2_VERSION}/build LIBS="-pthread" CFLAGS="-I${srcdir}/${BORING_SSL_DIR}/build -I${srcdir}/${NGHTTP2_VERSION}/build" LIBS="-pthread" USE_CURL_SSLKEYLOGFILE=true + make clean + make + ver=$(readlink -f lib/.libs/libcurl.so | sed 's/.*so\.//') + cp "lib/.libs/libcurl.so.$ver" "out/libcurl-impersonate.so.$ver" + strip "out/libcurl-impersonate.so.$ver" +} + prepare () { patch_boringssl patch_nghttp2 @@ -112,11 +124,23 @@ build () { build_boringssl build_nghttp2 build_curl + build_libcurl } package () { - cd ${CURL_VERSION}/out + mkdir -p "${pkgdir}/usr/lib/" + + cd ${CURL_VERSION} + ver=$(readlink -f lib/.libs/libcurl.so | sed 's/.*so\.//') + major=$(echo -n $ver | cut -d'.' -f1) + cd out/ + sed -i "s/\$dir\/curl-impersonate/${pkgname}/g" curl_* install -Dm755 curl-impersonate "${pkgdir}/usr/bin/${pkgname}" install -Dm755 curl_* "${pkgdir}/usr/bin/" + install -Dm755 libcurl-impersonate.so.$ver "${pkgdir}/usr/lib/libcurl-impersonate-chrome.so.$ver" + + cd "${pkgdir}/usr/lib/" + ln -s "libcurl-impersonate-chrome.so.$ver" "libcurl-impersonate-chrome.so.$major" + ln -s "libcurl-impersonate-chrome.so.$ver" "libcurl-impersonate-chrome.so" } |