summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 33b513de961c2c3eb9942e9d4ee58070c8e87ed0 (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
51
52
53
# Maintainer: Joey Dumont <joey.dumont@gmail.com>
pkgname=nano-git
pkgver=20180208
pkgrel=1
pkgdesc="Pico editor clone with enhancements, git version"
arch=(i686 x86_64)
license=('GPL')
url="http://www.nano-editor.org"
depends=('glibc' 'ncurses')
makedepends=('texinfo' 'subversion')
source=(git://git.savannah.gnu.org/nano.git)
backup=('etc/nanorc')
provides=('nano')
conflicts=('nano')
replaces=('nano-svn')
md5sums=('SKIP')

pkgver() {
    # Identify latest version.
    cd "$srcdir/nano"
    git log -1 --format="%cd" --date=short | sed 's|-||g'
}

prepare() {
    # Running the configure script.
    cd $srcdir/nano
    ./autogen.sh

    ./configure                     \
        --prefix=/usr               \
	--sysconfdir=/etc           \
	--enable-color              \
	--enable-nanorc             \
	--enable-multibuffer        \
	--bindir=/usr/bin           \
	--sbindir=/usr/bin          \
	--disable-wrapping-as-root
}

build() {
    cd $srcdir/nano
    make
}

package(){
    # Removing unwanted source dir.
    rm -r $startdir/nano

    # Moving everything to pkg/.
    cd $srcdir/nano
    make DESTDIR=$pkgdir sbindir=/usr/bin install
    install -DTm644 $srcdir/nano/doc/nanorc.sample $pkgdir/etc/nanorc
}