mirror of
https://github.com/balkian/draft-bin.git
synced 2024-12-22 01:08:13 +00:00
First commit. 0.10.0
This commit is contained in:
commit
aa1aa81c82
15
.SRCINFO
Normal file
15
.SRCINFO
Normal file
@ -0,0 +1,15 @@
|
||||
pkgbase = draft-bin
|
||||
pkgdesc = Draft client
|
||||
pkgver = 0.10.0
|
||||
pkgrel = 1
|
||||
url = http://draft.sh
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
license = mit
|
||||
source_i686 = draft-0.10.0::https://azuredraft.blob.core.windows.net/draft/draft-v0.10.0-linux-386.tar.gz
|
||||
md5sums_i686 = c3e02176572b85a609155a7da014b3c4
|
||||
source_x86_64 = draft-0.10.0::https://azuredraft.blob.core.windows.net/draft/draft-v0.10.0-linux-amd64.tar.gz
|
||||
md5sums_x86_64 = d8c7fe25a6a04232f9b7df4d969e516c
|
||||
|
||||
pkgname = draft-bin
|
||||
|
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
*.bak
|
||||
tmp
|
||||
src
|
||||
pkg
|
||||
draft-*
|
48
Makefile
Normal file
48
Makefile
Normal file
@ -0,0 +1,48 @@
|
||||
|
||||
|
||||
|
||||
|
||||
PHOHY = clean release
|
||||
|
||||
VERSION:=0.10.0
|
||||
BASEURL:=https://azuredraft.blob.core.windows.net/draft
|
||||
URL_386:=${BASEURL}/draft-v${VERSION}-linux-386.tar.gz
|
||||
URL_AMD64:=${BASEURL}/draft-v${VERSION}-linux-amd64.tar.gz
|
||||
|
||||
check:
|
||||
ifndef VERSION
|
||||
@echo "Define version in ENV"
|
||||
@exit 1;
|
||||
else
|
||||
@echo "Build version ${VERSION}"
|
||||
endif
|
||||
|
||||
|
||||
tmp:
|
||||
@mkdir -p tmp
|
||||
|
||||
tmp/draft_amd64-${VERSION}: tmp
|
||||
curl -s ${URL_AMD64} > tmp/draft_amd64-${VERSION}
|
||||
|
||||
|
||||
tmp/draft_386-${VERSION}: tmp
|
||||
curl -s ${URL_386} > tmp/draft_386-${VERSION}
|
||||
|
||||
pkgbuild: tmp/draft_amd64-${VERSION} tmp/draft_386-${VERSION} PKGBUILD.template
|
||||
set -e; \
|
||||
echo ${URL_386}; \
|
||||
MD5_386=`md5sum tmp/draft_386-${VERSION} | awk '{print $$1}'`; \
|
||||
MD5_AMD64=`md5sum tmp/draft_amd64-${VERSION} | awk '{print $$1}'`; \
|
||||
sed -r -e "s#PKGVER#${VERSION}#g" \
|
||||
-e "s#URL_386#${URL_386}#g" \
|
||||
-e "s#URL_AMD64#${URL_AMD64}#g" \
|
||||
-e "s#MD5_386#$${MD5_386}#g" \
|
||||
-e "s#MD5_AMD64#$${MD5_AMD64}#g" PKGBUILD.template > PKGBUILD; \
|
||||
makepkg --printsrcinfo > .SRCINFO; \
|
||||
|
||||
release: pkgbuild
|
||||
makepkg; \
|
||||
sudo pacman -U draft-bin*; \
|
||||
|
||||
clean:
|
||||
rm -rf PKGBUILD draft-* pkg src *.bak tmp
|
26
PKGBUILD
Normal file
26
PKGBUILD
Normal file
@ -0,0 +1,26 @@
|
||||
# Maintainer: larte <lauri.arte@gmail.com>
|
||||
# Contributor: Maxwell Pray a.k.a. Synthead <synthead@gmail.com>
|
||||
|
||||
pkgname=draft-bin
|
||||
pkgdesc="Draft client"
|
||||
pkgver=0.10.0
|
||||
pkgrel=1
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://draft.sh"
|
||||
license=('mit')
|
||||
conflicts=()
|
||||
_draft_file=draft-$pkgver
|
||||
source_i686=($_draft_file::https://azuredraft.blob.core.windows.net/draft/draft-v0.10.0-linux-386.tar.gz )
|
||||
source_x86_64=($_draft_file::https://azuredraft.blob.core.windows.net/draft/draft-v0.10.0-linux-amd64.tar.gz )
|
||||
md5sums_i686=('c3e02176572b85a609155a7da014b3c4')
|
||||
md5sums_x86_64=('d8c7fe25a6a04232f9b7df4d969e516c')
|
||||
|
||||
package() {
|
||||
FOLDER="linux-386"
|
||||
if [[ $CARCH -eq 'x86_64' ]];
|
||||
then
|
||||
FOLDER="linux-amd64"
|
||||
fi
|
||||
|
||||
install -Dm 755 "$srcdir/$FOLDER/draft" "$pkgdir/usr/bin/draft"
|
||||
}
|
26
PKGBUILD.template
Normal file
26
PKGBUILD.template
Normal file
@ -0,0 +1,26 @@
|
||||
# Maintainer: larte <lauri.arte@gmail.com>
|
||||
# Contributor: Maxwell Pray a.k.a. Synthead <synthead@gmail.com>
|
||||
|
||||
pkgname=draft-bin
|
||||
pkgdesc="Draft client"
|
||||
pkgver=PKGVER
|
||||
pkgrel=1
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://draft.sh"
|
||||
license=('mit')
|
||||
conflicts=()
|
||||
_draft_file=draft-$pkgver
|
||||
source_i686=($_draft_file::URL_386)
|
||||
source_x86_64=($_draft_file::URL_AMD64)
|
||||
md5sums_i686=('MD5_386')
|
||||
md5sums_x86_64=('MD5_AMD64')
|
||||
|
||||
package() {
|
||||
FOLDER="linux-386"
|
||||
if [[ $CARCH -eq 'x86_64' ]];
|
||||
then
|
||||
FOLDER="linux-amd64"
|
||||
fi
|
||||
|
||||
install -Dm 755 "$srcdir/$FOLDER/draft" "$pkgdir/usr/bin/draft"
|
||||
}
|
18
README.md
Normal file
18
README.md
Normal file
@ -0,0 +1,18 @@
|
||||
# draft-bin-AUR
|
||||
|
||||
This PKGBUILD for arch linux package system.
|
||||
available at [https://aur.archlinux.org/packages/draft-bin/](https://aur.archlinux.org/packages/draft-bin/)
|
||||
|
||||
## Usage
|
||||
|
||||
To build:
|
||||
|
||||
$ makepkg
|
||||
|
||||
To install:
|
||||
|
||||
$ sudo pacman -U <package name>
|
||||
|
||||
To generate a new version, change the VERSION variable in the Makefile and run:
|
||||
|
||||
$ make pkgbuild
|
Loading…
Reference in New Issue
Block a user