diff options
author | aksr | 2015-06-29 08:00:59 +0200 |
---|---|---|
committer | aksr | 2015-06-29 08:00:59 +0200 |
commit | 4ca56be87fa971d616991919a05ca2f89915e119 (patch) | |
tree | 71ea94fd9d1e587aee0418f68a6fa7500ffbfa02 | |
download | aur-4ca56be87fa971d616991919a05ca2f89915e119.tar.gz |
Start.
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | PKGBUILD | 66 | ||||
-rw-r--r-- | cnoor-git.install | 11 | ||||
-rw-r--r-- | cnoor.1 | 52 | ||||
-rw-r--r-- | config.h | 21 |
5 files changed, 181 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..59b5a824b6e6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = cnoor-git + pkgdesc = A simple framebuffer holy Quran viewer. + pkgver = r93.458780d + pkgrel = 1 + url = http://litcave.rudi.ir/ + install = cnoor-git.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = git + optdepends = ttf-sil-scheherazade: quran font + optdepends = ttf-dejavu: reader font + source = cnoor-git::git+git://repo.or.cz/cnoor.git + source = cnoor.1 + source = config.h + source = http://tanzil.net/trans/en.ahmedali + md5sums = SKIP + md5sums = c5e914abff7843191998a5a3da0c386d + md5sums = ab0e8455b71c4042c8acbdbafba5d8e0 + md5sums = 4440b64e31448eee1e65f3ad09439dac + sha1sums = SKIP + sha1sums = 8a232ff84fe36112e0d58aa06f6978f63c81c1dc + sha1sums = 3ae09c097c17155be2ac80af24314f685bdd275a + sha1sums = 039ef775054904e89278a6d5f27ae04d80d41ffa + sha256sums = SKIP + sha256sums = d87c5c5c4585f09f3af7a39e8ebb75f7b9a673e95966f56249b17cfcba1d6bba + sha256sums = 624cd5c1a4202695682ecccc338273d74d51029179319bc28ddbd7e9f76e4987 + sha256sums = 4fdc3e02ab16c6f6d841416c4b86cc1ad950a2c0436f5c92637db67c813ed62d + +pkgname = cnoor-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8c0248e9c710 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,66 @@ +# Contributor: Sara <sara at archlinux dot us> +# Maintainer: aksr <aksr at t-com dot me> +pkgname=cnoor-git +pkgver=r93.458780d +pkgrel=1 +epoch= +pkgdesc="A simple framebuffer holy Quran viewer." +arch=('i686' 'x86_64') +url="http://litcave.rudi.ir/" +license=('GPL') +groups=() +depends=('') +makedepends=('git') +optdepends=() +optdepends=('ttf-sil-scheherazade: quran font' + 'ttf-dejavu: reader font') +checkdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +changelog= +install=$pkgname.install +source=("$pkgname::git+git://repo.or.cz/cnoor.git" + 'cnoor.1' + 'config.h' + 'http://tanzil.net/trans/en.ahmedali') +noextract=() +md5sums=('SKIP' + 'c5e914abff7843191998a5a3da0c386d' + 'ab0e8455b71c4042c8acbdbafba5d8e0' + '4440b64e31448eee1e65f3ad09439dac') +sha1sums=('SKIP' + '8a232ff84fe36112e0d58aa06f6978f63c81c1dc' + '3ae09c097c17155be2ac80af24314f685bdd275a' + '039ef775054904e89278a6d5f27ae04d80d41ffa') +sha256sums=('SKIP' + 'd87c5c5c4585f09f3af7a39e8ebb75f7b9a673e95966f56249b17cfcba1d6bba' + '624cd5c1a4202695682ecccc338273d74d51029179319bc28ddbd7e9f76e4987' + '4fdc3e02ab16c6f6d841416c4b86cc1ad950a2c0436f5c92637db67c813ed62d') + +pkgver() { + cd $srcdir/$pkgname + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd $srcdir/$pkgname + cp $srcdir/config.h config.h + sed -i "10s|user|$HOME/.quran/quran-simple.txt|" config.h +} + +build() { + cd $srcdir/$pkgname + make all +} + +package() { + cd $srcdir/$pkgname + install -Dm755 cnoor $pkgdir/usr/bin/cnoor + install -Dm755 README $pkgdir/usr/share/doc/${pkgname//-git/}/README + install -Dm644 ../cnoor.1 $pkgdir/usr/share/man/man1/cnoor.1 + install -Dm644 ../en.ahmedali $pkgdir/usr/share/doc/cnoor/en.ahmedali +} + diff --git a/cnoor-git.install b/cnoor-git.install new file mode 100644 index 000000000000..f6c56a1f4e14 --- /dev/null +++ b/cnoor-git.install @@ -0,0 +1,11 @@ +post_install() { + echo "==> You have to download Arabic Quran text file: " + echo " \"http://tanzil.info/download\" " + echo " By default, its path is \"\$HOME/.quran/quran-simple.txt\". " + echo "==> Note: The path to the Arabic Quran text file is absolute. " + echo "==> If you want to change the Quran text file location and/or other settings: " + echo " * Edit config.h " + echo " * $ updpkgsums " + echo " * Rebuild and install the package. " +} + diff --git a/cnoor.1 b/cnoor.1 new file mode 100644 index 000000000000..6e1075b2a2f4 --- /dev/null +++ b/cnoor.1 @@ -0,0 +1,52 @@ +.TH CNOOR 1 "NOVEMBER 2011" +.SH NAME +cnoor \- framebuffer holy Quran viewer +.SH SYNOPSIS +.B cnoor +.RI " surat number" +.SH DESCRIPTION +.B cnoor +is a fast and simple Quran viewer for the linux +framebuffer (optionally for X11 using GTK+), and +uses vim keyboard shortcuts. +.SH OPTIONS +.IP "\fB\-h\fR +Display brief usage information and quit +.SH KEY BINDINGS +.TP +.B j +Scroll down +.TP +.B k +Scroll up +.TP +.B ^f +Scroll down a screenful +.TP +.B ^b +Scroll up a screenful +.IP [\fI0-9\fR]+\fBG\fR +Go to the specified ayat, default to the end +.IP [\fI0-9\fR]+\fB%\fR +Jump to specified percent of surat +.IP \fBm\fR+[\fIa-z\fR] +Mark position for snap back. +.IP \fB'\fR+[\fIa-z\fR] +Pop back to marked position. +.TP +.B i +Display surat information +.TP +.B ^l +Redraw screen +.TP +.B q +Quit program +.SH CUSTOMIZATION +.B cnoor +is customized by editing the supplied config.h and (re)compiling +the source code. The absolute path to the Arabic Quran text must +be set in order to run \fBcnoor\fR, but it is optional to supply +a translation. +.SH AUTHOR +Ali Gholami Rudi <aligrudi at gmail dot com> diff --git a/config.h b/config.h new file mode 100644 index 000000000000..140054b548d9 --- /dev/null +++ b/config.h @@ -0,0 +1,21 @@ +/* cnoor config file */ + +/* framebuffer depth */ +typedef unsigned int fbval_t; + +/* optimized version of fb_val() */ +#define FB_VAL(r, g, b) fb_val((r), (g), (b)) + +/* you can get it from http://tanzil.info/download */ +#define QURAN_PATH "user" +/* it should be a utf-8 file with one aya per line or NULL */ +#define TRANS_PATH "/usr/share/doc/cnoor/en.ahmedali" + +/* fonts and colors */ +#define COLOR_FG 0x000000 +#define COLOR_BG 0xd5ddff +#define FONT_QURAN "scheherazade 17" +#define FONT_TRANS "DejaVu Sans 8" +#define FONT_NUM "DejaVu Sans Mono 7" +#define FONT_JUZ "DejaVu Sans Mono 7" +#define FONT_SAJDA "DejaVu Sans Mono 7" |