PKGBUILD 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Maintainer (Arch): Nicola Squartini <tensor5@gmail.com>
  2. # Maintainer: André Silva <emulatorman@hyperbola.info>
  3. pkgname=min
  4. pkgver=1.8.1
  5. pkgrel=1
  6. pkgrel+=.parabola1
  7. pkgdesc='A smarter, faster web browser'
  8. pkgdesc+=', without non-privacy search engines'
  9. arch=('any')
  10. url='https://minbrowser.github.io/min'
  11. license=('Apache')
  12. depends=('electron')
  13. makedepends=('grunt-cli' 'npm')
  14. source=("${pkgname}-${pkgver}.tar.gz::https://github.com/minbrowser/min/archive/v${pkgver}.tar.gz"
  15. 'min.desktop'
  16. 'min.js'
  17. 'icon.patch'
  18. 'remove_nonprivacy_options.patch')
  19. sha256sums=('56e5f03fc969bd5ebbb900fc89987c28e19e09710590ae9e9db47422b79a7d50'
  20. 'a779a8daff1d684779ebc6d13ea4c2f09e838df018de41fa19fa3f25aa12e32f'
  21. 'c22324184b72b3fad5a0aadb4e18182414e0294c5596c26426adc204fd473258'
  22. 'bb5e55a3c4074e1419f25b0605b77ef622d2870235309e0feed88f790967a936'
  23. '76c8cc886007be01301c619b3ac1fc86369448e641ca9ae667a2cdd84b9c2276')
  24. prepare() {
  25. cd ${pkgname}-${pkgver}
  26. patch -Np1 -i "${srcdir}"/icon.patch
  27. patch -Np1 -i "${srcdir}"/remove_nonprivacy_options.patch
  28. }
  29. build() {
  30. cd ${pkgname}-${pkgver}
  31. npm install
  32. grunt
  33. rm -r node_modules
  34. npm install --production --no-optional
  35. }
  36. package() {
  37. cd ${pkgname}-${pkgver}
  38. appdir=/usr/lib/${pkgname}
  39. install -dm755 "${pkgdir}"${appdir}
  40. cp -r * "${pkgdir}"${appdir}
  41. install -dm755 "${pkgdir}"/usr/share/icons/hicolor/256x256/apps
  42. mv icons/icon256.png \
  43. "${pkgdir}"/usr/share/icons/hicolor/256x256/apps/${pkgname}.png
  44. install -Dm755 "${srcdir}"/${pkgname}.js "${pkgdir}"/usr/bin/${pkgname}
  45. install -Dm644 "${srcdir}"/${pkgname}.desktop \
  46. "${pkgdir}"/usr/share/applications/${pkgname}.desktop
  47. # Clean up
  48. rm "${pkgdir}"${appdir}/dist/build.js
  49. rm -r "${pkgdir}"${appdir}/icons
  50. rm -r "${pkgdir}"${appdir}/localization
  51. rm -r "${pkgdir}"${appdir}/main
  52. rm -r "${pkgdir}"${appdir}/scripts
  53. find "${pkgdir}"${appdir} \
  54. -name "package.json" \
  55. -exec sed -e "s|${srcdir}/${pkgname}-${pkgver}|${appdir}|" \
  56. -i {} \; \
  57. -or -name ".*" -prune -exec rm -r '{}' \; \
  58. -or -name "Gruntfile.js" -exec rm '{}' \; \
  59. -or -name "Makefile" -exec rm '{}' \; \
  60. -or -name "bin" -prune -exec rm -r '{}' \; \
  61. -or -name "bin.js" -exec rm '{}' \; \
  62. -or -name "bower.json" -exec rm '{}' \; \
  63. -or -name "cli.js" -exec rm '{}' \; \
  64. -or -name "cmd.js" -exec rm '{}' \; \
  65. -or -name "coffee" -prune -exec rm -r '{}' \; \
  66. -or -name "example" -prune -exec rm -r '{}' \; \
  67. -or -name "examples" -prune -exec rm -r '{}' \; \
  68. -or -name "gulpfile.js" -exec rm '{}' \; \
  69. -or -name "man" -prune -exec rm -r '{}' \; \
  70. -or -name "scripts" -prune -exec rm -r '{}' \; \
  71. -or -name "test" -prune -exec rm -r '{}' \; \
  72. -or -name "tests" -prune -exec rm -r '{}' \;
  73. }