Browse Source

update makefile, create pkgbuild

pull/3/head
James Fenn 1 year ago
parent
commit
6a1b44cd44
2 changed files with 55 additions and 6 deletions
  1. +25
    -6
      Makefile
  2. +30
    -0
      PKGBUILD

+ 25
- 6
Makefile View File

@@ -1,16 +1,35 @@
.PHONY: all install build test run
.PHONY: all install build test run clean

ifdef USEINSTALL
INSTALLEXEC := install -Dm755
INSTALL := install -Dm644
else
INSTALLEXEC := sudo cp
INSTALL := sudo cp
endif

all: build test

DESTDIR?=
install: build
sudo cp ./aight /usr/local/bin/git-aight
sudo ln -sf /usr/local/bin/git-aight /usr/local/bin/aight
$(INSTALLEXEC) "./aight" "${DESTDIR}/usr/bin/aight"
$(INSTALL) "./LICENSE" "${DESTDIR}/usr/share/licenses/aight/LICENSE"

build: aight

build:
aight: source/*
dub build

test:
dub test

run:
dub run
run: aight
./aight

clean:
rm -rf pkg/
rm -rf src/
rm -rf AIGHT/
rm -f aight-*.pkg.tar
rm -f aight-test-library
rm -f aight

+ 30
- 0
PKGBUILD View File

@@ -0,0 +1,30 @@
# Maintainer: Sean Bailey <sean@theonesean.com>
# Contributor: James Fenn <me@jfenn.me>

pkgname=('aight')
pkgver=0.0.0
pkgrel=1
pkgdesc="A command-line tool for getting todo tasks quickly."
arch=('x86_64')
url="https://github.com/theonesean/AIGHT"
license=('GPL3')
depends=('libphobos' 'curl')
makedepends=('git' 'make' 'dmd' 'dub')
provides=('aight')
conflicts=('aight')

source=('git+https://github.com/theonesean/AIGHT')
sha256sums=('SKIP')

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

build() {
make -C "$srcdir/AIGHT"
}

package() {
make -C "$srcdir/AIGHT" install DESTDIR="$pkgdir" USEINSTALL="true"
}

Loading…
Cancel
Save