diff options
author | Amin Vakil | 2020-09-23 15:07:30 +0330 |
---|---|---|
committer | Amin Vakil | 2020-09-23 15:07:30 +0330 |
commit | c4f366894c05ffa9d09bd4ccc94cc519ede89023 (patch) | |
tree | 5e797de55f34d7e523e566058a1bf3e5cbd36aaa | |
parent | 16039aa46ab8d60cbb8c6ede73ec24073e0903b4 (diff) | |
download | aur-c4f366894c05ffa9d09bd4ccc94cc519ede89023.tar.gz |
Various changes in PKGBUILD
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | tor-browser.desktop.in (renamed from tor-browser.desktop) | 4 | ||||
-rwxr-xr-x | tor-browser.in (renamed from tor-browser.sh) | 13 | ||||
-rw-r--r-- | tor-browser.install | 10 | ||||
-rw-r--r-- | tor-browser.svg | 31 |
6 files changed, 94 insertions, 50 deletions
@@ -1,7 +1,7 @@ pkgbase = tor-browser-behind-tor pkgdesc = Tor Browser Bundle: anonymous browsing using Firefox and Tor (international PKGBUILD) (using tor service to download sources) pkgver = 9.5.4 - pkgrel = 1 + pkgrel = 2 url = https://www.torproject.org/projects/torbrowser.html install = tor-browser.install arch = i686 @@ -30,20 +30,22 @@ pkgbase = tor-browser-behind-tor optdepends = libnotify: Gnome dialog boxes noextract = tor-browser-linux32-9.5.4_en-US.tar.xz noextract = tor-browser-linux64-9.5.4_en-US.tar.xz - source = tor-browser.desktop + source = tor-browser.desktop.in + source = tor-browser.in source = tor-browser.png - source = tor-browser.sh + source = tor-browser.svg validpgpkeys = EF6E286DDA85EA2A4BA7DE684E2C6E8793298290 - sha256sums = 9ee0a4672e2d0835ffb94bcf26e17b56432030496a9cdf019b70c96083c24340 + sha256sums = 0b0614d04d55ac3748775fd34cb6c1f244fd05b5a16cc1e3ae70d887f7eedbc6 + sha256sums = 8a6e0945571c332c1fc8b1cef11d15f699a752da2bb403bd0b65ee44821cc643 sha256sums = f25ccf68b47f5eb14c6fec0664c74f30ea9c6c58d42fc6abac3b64670aaa3152 - sha256sums = 89118837e6db1d7b089e0067a6430e9a1a8602a64e00b7ea94382abfb0d3e502 + sha256sums = 7b28b5dbe8ad573bb46e61b4d542b33e01ca240825ca640b4893fee6203b021f source_i686 = https://dist.torproject.org/torbrowser/9.5.4/tor-browser-linux32-9.5.4_en-US.tar.xz source_i686 = https://dist.torproject.org/torbrowser/9.5.4/tor-browser-linux32-9.5.4_en-US.tar.xz.asc - sha256sums_i686 = cb10c6349d3e25a273cfd8aa77fa672c9b763241fa6f1e42378d98c43b002f9d + sha256sums_i686 = 1320f20310793a0d429f4e2db8117da1bf01c6a50bcb652bd3b06e0f16659aa4 sha256sums_i686 = SKIP source_x86_64 = https://dist.torproject.org/torbrowser/9.5.4/tor-browser-linux64-9.5.4_en-US.tar.xz source_x86_64 = https://dist.torproject.org/torbrowser/9.5.4/tor-browser-linux64-9.5.4_en-US.tar.xz.asc - sha256sums_x86_64 = 648931503b886d687828df9730aa284b7c18303682cc82f06c9da4a734c81bcf + sha256sums_x86_64 = 5d6d81db04e0a8c536c3d5e13c935c52318bac7ca44089e031c1bf7c54d66f4e sha256sums_x86_64 = SKIP pkgname = tor-browser-behind-tor @@ -16,9 +16,10 @@ # tor-browser -u +_pkgname='tor-browser' pkgname='tor-browser-behind-tor' pkgver='9.5.4' -pkgrel='1' +pkgrel='2' pkgdesc='Tor Browser Bundle: anonymous browsing using Firefox and Tor (international PKGBUILD) (using tor service to download sources)' url='https://www.torproject.org/projects/torbrowser.html' arch=('i686' 'x86_64') @@ -57,9 +58,9 @@ _localetor() { local _fulllocale="$(locale | grep LANG | cut -d= -f2 | cut -d. -f1 | sed s/_/\-/)" local _shortlocale="$(locale | grep LANG | cut -d= -f2 | cut -d_ -f1)" - if curl --output /dev/null --silent --head --fail "${_urlbase}/tor-browser-${_archstr}-${pkgver}_${_fulllocale}.tar.xz"; then + if curl --output /dev/null --silent --head --fail "${_urlbase}/${_pkgname}-${_archstr}-${pkgver}_${_fulllocale}.tar.xz"; then echo -n "${_fulllocale}" - elif curl --output /dev/null --silent --head --fail "${_urlbase}/tor-browser-${_archstr}-${pkgver}_${_shortlocale}.tar.xz"; then + elif curl --output /dev/null --silent --head --fail "${_urlbase}/${_pkgname}-${_archstr}-${pkgver}_${_shortlocale}.tar.xz"; then echo -n "${_shortlocale}" else echo -n 'en-US' @@ -77,22 +78,31 @@ _dist_checksum() { curl --silent --fail "${_urlbase}/sha256sums-signed-build.txt" | grep "${1}-${pkgver}_${_language}.tar.xz" | cut -d ' ' -f1 } -source_i686=("${_urlbase}/tor-browser-${_tag_i686}-${pkgver}_${_language}.tar.xz"{,.asc}) -source_x86_64=("${_urlbase}/tor-browser-${_tag_x86_64}-${pkgver}_${_language}.tar.xz"{,.asc}) -source=("tor-browser.desktop" + +source_i686=("${_urlbase}/${_pkgname}-${_tag_i686}-${pkgver}_${_language}.tar.xz"{,.asc}) +source_x86_64=("${_urlbase}/${_pkgname}-${_tag_x86_64}-${pkgver}_${_language}.tar.xz"{,.asc}) + +# Make a string suitable for `sed`, by escaping "[]/&$.*^\" - syntax: `_sed_escape STRING` +_sed_escape() { + echo "${1}" | sed 's/[]\/&.*$^[]/\\&/g' +} + +source=("tor-browser.desktop.in" + "tor-browser.in" "tor-browser.png" - "tor-browser.sh") + "tor-browser.svg") -sha256sums=('9ee0a4672e2d0835ffb94bcf26e17b56432030496a9cdf019b70c96083c24340' +sha256sums=('0b0614d04d55ac3748775fd34cb6c1f244fd05b5a16cc1e3ae70d887f7eedbc6' + '8a6e0945571c332c1fc8b1cef11d15f699a752da2bb403bd0b65ee44821cc643' 'f25ccf68b47f5eb14c6fec0664c74f30ea9c6c58d42fc6abac3b64670aaa3152' - '89118837e6db1d7b089e0067a6430e9a1a8602a64e00b7ea94382abfb0d3e502') + '7b28b5dbe8ad573bb46e61b4d542b33e01ca240825ca640b4893fee6203b021f') sha256sums_i686=('1320f20310793a0d429f4e2db8117da1bf01c6a50bcb652bd3b06e0f16659aa4' 'SKIP') sha256sums_x86_64=('5d6d81db04e0a8c536c3d5e13c935c52318bac7ca44089e031c1bf7c54d66f4e' 'SKIP') -noextract=("tor-browser-${_tag_i686}-${pkgver}_${_language}.tar.xz" - "tor-browser-${_tag_x86_64}-${pkgver}_${_language}.tar.xz") +noextract=("${_pkgname}-${_tag_i686}-${pkgver}_${_language}.tar.xz" + "${_pkgname}-${_tag_x86_64}-${pkgver}_${_language}.tar.xz") prepare() { @@ -109,38 +119,40 @@ prepare() { msg "Packaging tor-browser (language: ${_language})..." if [[ -z "${TORBROWSER_PKGLANG}" ]]; then - echo -e "\n ${_COL_BBLUE_}->${_COL_DEFAULT_} ${_COL_BRED_}NOTE:${_COL_DEFAULT_} If you want to package ${_COL_BWHITE_}tor-browser${_COL_DEFAULT_} in a different language, please" + echo -e "\n ${_COL_BBLUE_}->${_COL_DEFAULT_} ${_COL_BRED_}NOTE:${_COL_DEFAULT_} If you want to package ${_COL_BWHITE_}${_pkgname}${_COL_DEFAULT_} in a different language, please" echo -e " set a \`${_COL_YELLOW_}TORBROWSER_PKGLANG${_COL_DEFAULT_}\` environment variable before running makepkg.\n" echo ' For instance:' echo -e "\n ${_COL_LIGHTGREY_}TORBROWSER_PKGLANG='en-US' makepkg${_COL_DEFAULT_}\n" fi - # we search and replace using sed with / as delimiter below so don't allow slashes in these vars. - # makepkg already enforces that there're no slashes in tor-browser, so we don't check that again here. - if [[ ${pkgver} = */* || ${_language} = */* || ${pkgdesc} = */* ]]; then - error '${pkgver}, ${_language} and ${pkgdesc} for this package are not allowed to contain /' >&2 - return 1 - fi - } package() { cd "${srcdir}" - sed -i "s/__REPL_LANGUAGE__/${_language}/g" "tor-browser.desktop" + local _sed_subst=" + s/@PACKAGE_NAME@/$(_sed_escape "${_pkgname}")/g + s/@PACKAGE_VERSION@/$(_sed_escape "${pkgver}")/g + s/@PACKAGE_RELEASE@/$(_sed_escape "${pkgrel}")/g + s/@PACKAGE_LANGUAGE@/$(_sed_escape "${_language}")/g + s/@PACKAGE_ARCH@/$(_sed_escape "${_archstr}")/g + " + + install -dm755 "${pkgdir}/usr/bin" + sed "${_sed_subst}" "${_pkgname}.in" > "${pkgdir}/usr/bin/${_pkgname}" + chmod +x "${pkgdir}/usr/bin/${_pkgname}" + + install -Dm 644 "${_pkgname}.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png" - sed -i "s/__REPL_NAME__/tor-browser/g" "tor-browser.sh" - sed -i "s/__REPL_VERSION__/${pkgver}/g" "tor-browser.sh" - sed -i "s/__REPL_RELEASE__/${pkgrel}/g" "tor-browser.sh" - sed -i "s/__REPL_LANGUAGE__/${_language}/g" "tor-browser.sh" - sed -i "s/__REPL_ARCH__/${_archstr}/g" "tor-browser.sh" + install -Dm 644 "${_pkgname}.svg" "${pkgdir}/usr/share/pixmaps/${_pkgname}.svg" - install -Dm 644 "tor-browser.desktop" "${pkgdir}/usr/share/applications/tor-browser.desktop" - install -Dm 644 "tor-browser.png" "${pkgdir}/usr/share/pixmaps/tor-browser.png" - install -Dm 755 "tor-browser.sh" "${pkgdir}/usr/bin/tor-browser" + install -dm755 "${pkgdir}/usr/share/applications" + sed "${_sed_subst}" "${_pkgname}.desktop.in" > \ + "${pkgdir}/usr/share/applications/${_pkgname}.desktop" - install -Dm 644 "tor-browser-${_archstr}-${pkgver}_${_language}.tar.xz" "${pkgdir}/opt/tor-browser/tor-browser-${_archstr}-${pkgver}_${_language}.tar.xz" + install -Dm 644 "${_pkgname}-${_archstr}-${pkgver}_${_language}.tar.xz" \ + "${pkgdir}/opt/${_pkgname}/${_pkgname}-${_archstr}-${pkgver}_${_language}.tar.xz" } diff --git a/tor-browser.desktop b/tor-browser.desktop.in index aca8d1123e6e..bc28ce6f2b57 100644 --- a/tor-browser.desktop +++ b/tor-browser.desktop.in @@ -1,8 +1,8 @@ [Desktop Entry] Version=1.0 Type=Application -Name=Tor Browser (__REPL_LANGUAGE__) -Exec=/usr/bin/tor-browser +Name=Tor Browser (@PACKAGE_LANGUAGE@) +Exec=/usr/bin/tor-browser %u Icon=tor-browser Categories=Network; Comment=Anonymous browsing using Firefox and Tor diff --git a/tor-browser.sh b/tor-browser.in index 2ca37f23c427..9c3b0252ab17 100755 --- a/tor-browser.sh +++ b/tor-browser.in @@ -25,11 +25,11 @@ set -e # CONSTANTS AND VARIABLES # filled by PKGBUILD -_TB_PKGNAME_='__REPL_NAME__' -_TB_VERSION_='__REPL_VERSION__' -_TB_RELEASE_='__REPL_RELEASE__' -_TB_LANGUAGE_="__REPL_LANGUAGE__" -_TB_ARCH_='__REPL_ARCH__' +_TB_PKGNAME_='@PACKAGE_NAME@' +_TB_VERSION_='@PACKAGE_VERSION@' +_TB_RELEASE_='@PACKAGE_RELEASE@' +_TB_LANGUAGE_="@PACKAGE_LANGUAGE@" +_TB_ARCH_='@PACKAGE_ARCH@' # other constants and variables _TB_HOME_DIR_=~/".${_TB_PKGNAME_}" @@ -177,8 +177,7 @@ cd "${_TB_HOME_DIR_}" [[ ! -f "${_TB_VER_FILE_}" ]] && echo 0 > "${_TB_VER_FILE_}" # get the installed version -while read _TB_VER_LINE_ -do +while read _TB_VER_LINE_; do _TB_INSTALLED_VERSION_="${_TB_VER_LINE_}" done < "${_TB_VER_FILE_}" diff --git a/tor-browser.install b/tor-browser.install index 5317164af9b0..01fe250d5fbd 100644 --- a/tor-browser.install +++ b/tor-browser.install @@ -1,16 +1,16 @@ -pkgname='tor-browser' +_pkgname='tor-browser' post_install() { echo - echo "==> ${pkgname} will be extracted to ~/.${pkgname}" - echo "==> the first time you run ${pkgname} as your normal user!" + echo "==> ${_pkgname} will be extracted to ~/.${_pkgname}" + echo "==> the first time you run ${_pkgname} as your normal user!" echo "==> Just start it and have fun." echo } post_upgrade() { echo - echo "==> The ${pkgname} copy in your home directory will be upgraded at the" + echo "==> The ${_pkgname} copy in your home directory will be upgraded at the" echo "==> first time you run it as your normal user!" echo "==> Just start and have fun." echo @@ -21,6 +21,6 @@ post_remove() { echo "==> You have to remove the tor-brower directory in your home" echo "==> directory by hand: As your normal user, do:" echo "==> " - echo "==> rm -rf ~/.${pkgname}" + echo "==> rm -rf ~/.${_pkgname}" echo } diff --git a/tor-browser.svg b/tor-browser.svg new file mode 100644 index 000000000000..f0ceb85eabd3 --- /dev/null +++ b/tor-browser.svg @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="512px" height="512px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <defs> + <linearGradient x1="50%" y1="100%" x2="50%" y2="0%" id="linearGradient-1"> + <stop stop-color="#420C5D" offset="0%"/> + <stop stop-color="#951AD1" offset="100%"/> + </linearGradient> + <path d="M25,29 C152.577777,29 256,131.974508 256,259 C256,386.025492 152.577777,489 25,489 L25,29 Z" id="path-2"/> + <filter x="-18.2%" y="-7.4%" width="129.4%" height="114.8%" filterUnits="objectBoundingBox" id="filter-3"> + <feOffset dx="-8" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"/> + <feGaussianBlur stdDeviation="10" in="shadowOffsetOuter1" result="shadowBlurOuter1"/> + <feColorMatrix values="0 0 0 0 0.250980392 0 0 0 0 0.250980392 0 0 0 0 0.250980392 0 0 0 0.2 0" type="matrix" in="shadowBlurOuter1"/> + </filter> + </defs> + <g id="tor-browser-icon" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g id="icon_512x512"> + <g id="Group"> + <g id="tb_icon/Stable"> + <g id="Stable"> + <circle id="background" fill="#F2E4FF" fill-rule="nonzero" cx="256" cy="256" r="246"/> + <path d="M256.525143,465.439707 L256.525143,434.406609 C354.826191,434.122748 434.420802,354.364917 434.420802,255.992903 C434.420802,157.627987 354.826191,77.8701558 256.525143,77.5862948 L256.525143,46.5531962 C371.964296,46.8441537 465.446804,140.489882 465.446804,255.992903 C465.446804,371.503022 371.964296,465.155846 256.525143,465.439707 Z M256.525143,356.820314 C311.970283,356.529356 356.8487,311.516106 356.8487,255.992903 C356.8487,200.476798 311.970283,155.463547 256.525143,155.17259 L256.525143,124.146588 C329.115485,124.430449 387.881799,183.338693 387.881799,255.992903 C387.881799,328.654211 329.115485,387.562455 256.525143,387.846316 L256.525143,356.820314 Z M256.525143,201.718689 C286.266674,202.00255 310.3026,226.180407 310.3026,255.992903 C310.3026,285.812497 286.266674,309.990353 256.525143,310.274214 L256.525143,201.718689 Z M0,255.992903 C0,397.384044 114.60886,512 256,512 C397.384044,512 512,397.384044 512,255.992903 C512,114.60886 397.384044,0 256,0 C114.60886,0 0,114.60886 0,255.992903 Z" id="center" fill="url(#linearGradient-1)"/> + <g id="half" transform="translate(140.500000, 259.000000) scale(-1, 1) translate(-140.500000, -259.000000) "> + <use fill="black" fill-opacity="1" filter="url(#filter-3)" xlink:href="#path-2"/> + <use fill="url(#linearGradient-1)" fill-rule="evenodd" xlink:href="#path-2"/> + </g> + </g> + </g> + </g> + </g> + </g> +</svg>
\ No newline at end of file |