summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 999222783280d1e1cac2c91ec0328d69bdcd1dc1 (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
54
# Maintainer: Your Name <lucyrandall@helltop.net>
pkgname=aee-anoraktrend-git
pkgver=2.2.22.r25.c77b92a
pkgrel=1
pkgdesc="Another Easy Editor - a simple, easy to use terminal-based screen oriented editor"
arch=('x86_64' 'i686' 'aarch64')
url="https://helltop.net/projects"
license=('custom:Artistic')
depends=('libncursesw.so')
makedepends=('git' 'cmake' 'make')
provides=('aee')
conflicts=('aee' 'aee-git')
source=("git+https://github.com/anoraktrend/aee.git")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/aee"
    printf "2.2.22.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/aee"
    
    # Create build directory
    mkdir -p build
    cd build
    
    # Configure with CMake, disabling format-security warnings
    CFLAGS="$CFLAGS -Wno-format-security -Wno-unused-result" \
    cmake .. \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_C_FLAGS="-Wno-format-security -Wno-unused-result"
    
    # Build the project
    make
}

package() {
    cd "$srcdir/aee/build"
    
    # Install using CMake
    make DESTDIR="$pkgdir" install
    
    # Install license
    install -Dm644 "$srcdir/aee/LICENSE" \
        "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    
    # Install documentation
    install -Dm644 "$srcdir/aee/README.md" \
        "$pkgdir/usr/share/doc/$pkgname/README.md"
    install -Dm644 "$srcdir/aee/aee.i18n.guide" \
        "$pkgdir/usr/share/doc/$pkgname/aee.i18n.guide"
}