yochananmarqos

Untitled

Aug 3rd, 2020 (edited)
136
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=file-commander-git
  2. pkgver=0.9.4.12.469.r0.g476733a
  3. pkgrel=1
  4. pkgdesc="Qt-based cross-platform Total Commander-like orthodox file manager"
  5. arch=('x86_64')
  6. url="https://github.com/VioletGiraffe/file-commander"
  7. license=('GPL3')
  8. depends=('qt5-base')
  9. optdepends=('hunspell')
  10. provides=("${pkgname%-git}")
  11. conflicts=("${pkgname%-git}")
  12. source=('git+https://github.com/VioletGiraffe/file-commander.git'
  13.         'git+https://github.com/VioletGiraffe/cpp-template-utils.git'
  14.         'git+https://github.com/VioletGiraffe/cpputils.git'
  15.         'git+https://github.com/VioletGiraffe/github-releases-autoupdater.git'
  16.         'git+https://github.com/VioletGiraffe/image-processing.git'
  17.         'git+https://github.com/VioletGiraffe/qtutils.git'
  18.         'git+https://github.com/VioletGiraffe/text-encoding-detector.git')
  19. sha256sums=('SKIP'
  20.             'SKIP'
  21.             'SKIP'
  22.             'SKIP'
  23.             'SKIP'
  24.             'SKIP'
  25.             'SKIP')
  26.  
  27. pkgver() {
  28.     cd "$srcdir/${pkgname%-git}"
  29.     git describe --long --tags | sed 's/v//;s/\([^-]*-g\)/r\1/;s/-/./g'
  30. }
  31.  
  32. prepare() {
  33.     cd "$srcdir/${pkgname%-git}"
  34.     git submodule init
  35.     for submodule in cpp-template-utils cpputils github-releases-autoupdater \
  36.         image-processing qtutils text-encoding-detector; do
  37.         git config submodule.${submodule}.url "$srcdir/${submodule}"
  38.     done
  39.     git submodule update
  40.  
  41.     # Fix icon name
  42.     sed -i 's/Icon=icon/Icon=file-commander/g' qt-app/file_commander.desktop
  43. }
  44.  
  45. build() {
  46.     cd "$srcdir/${pkgname%-git}"
  47.     qmake PREFIX=/usr
  48.     make
  49. }
  50.  
  51. package() {
  52.     cd "$srcdir/${pkgname%-git}"
  53.     make INSTALL_ROOT="$pkgdir/" install
  54.  
  55.     # Rename icon
  56.     mv "$pkgdir/usr/share/icons/hicolor/256x256/apps/icon.png" \
  57.         "$pkgdir/usr/share/icons/hicolor/256x256/apps/${pkgname%-git}.png"
  58. }
RAW Paste Data