summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a5aa68ea96e547c65ab1fcfc55a160495de1ec5b (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: Joey Dumont <joey.dumont@gmail.com>
pkgname=nano-git
pkgver=20231210
pkgrel=1
pkgdesc="Pico editor clone with enhancements, git version"
arch=(x86_64)
license=('GPL')
url="http://www.nano-editor.org"
depends=('ncurses' 'file')
makedepends=('texinfo' 'git')
source=(git+https://git.savannah.gnu.org/git/nano.git)
backup=('etc/nanorc')
provides=('nano')
conflicts=('nano')
replaces=('nano-svn')
sha512sums=('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() {
    # Moving everything to pkg/.
    cd "$srcdir/nano"
    make DESTDIR="$pkgdir" sbindir=/usr/bin install
    install -DTm644 "$srcdir/nano/doc/sample.nanorc" "$pkgdir/etc/nanorc"
}