summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e889aef06d1737da9d5b0b5db5967fda7424b350 (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
44
45
46
47
48
49
50
# Maintainer: Federico Di Pierro <nierro92@gmail.com>

pkgname=ncursesfm-git
_gitname=ncursesFM
pkgver=v3.1.r37.gd823532
pkgrel=2
pkgdesc="A FileManager written in c and ncurses library."
arch=('i686' 'x86_64')
url="https://github.com/FedeDP/${_gitname}"
license=('GPL')
depends=('ncurses' 'libconfig' 'libarchive' 'glibc' 'libcups' 'systemd' 'libnotify')
optdepends=('xdg-utils: xdg-open support'
            'udisks2: mountable drives and ISO mount support'
            'packagekit: package installation support'
            'upower: AC (dis)connection events support')
# libcups and libnotify are optional build dep.
# If compiled without them, the program will run just fine;
# but that would disable desktop notifications and printing support.
makedepends=('git' 'bash-completion' 'cmake')
source=("git://github.com/FedeDP/${_gitname}.git")
backup=('etc/default/ncursesFM.conf')
install=ncursesFM.install
sha256sums=("SKIP")

pkgver() {
  cd "$_gitname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    cd "${srcdir}/${_gitname}"
    mkdir -p build
}

build() {
    cd "${srcdir}/${_gitname}/build"
    cmake \
        -G "Unix Makefiles" \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DENABLE_CUPS=true \
        -DENABLE_NOTIFY=true \
        ..
    make
}

package() {
    cd "${srcdir}/${_gitname}/build"
    make DESTDIR="$pkgdir" install
}