summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStoyan Minaev2019-05-24 12:52:47 +0300
committerStoyan Minaev2019-05-24 12:52:47 +0300
commit5e7024ba94e304e2b23bf6c4bf49349e15870df7 (patch)
treed85cc4a4aa71ca84ec849952134cffa7d649a787
parent4b0013e3524103351e9d763abb8429624cc2cc40 (diff)
downloadaur-5e7024ba94e304e2b23bf6c4bf49349e15870df7.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD114
2 files changed, 77 insertions, 56 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e18f763fc32..a7b8024e9c6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,12 @@
pkgbase = pkgbase
- pkgdesc = Pocketbook-Pro SDK for Linux
- pkgver = 1.1
+ pkgdesc = Japanese-Russian kanji and word dictionary
+ pkgver = 1.10
pkgrel = 1
- url = https://sourceforge.net/projects/pocketbook-free/files/PocketBook_Pro_SDK_Linux_1.1/
+ url = http://www.susi.ru/yarxi/
arch = x86_64
license = custom
- optdepends = cmake: build some pocketbook apps from /usr/share/pocketbook-pro-sdk-linux/sources/
- optdepends = freetype2: use freetype in your apps, also required to build some pocketbook apps
- optdepends = gtk2: use GTK2 in your apps, also required to build some pocketbook apps
- optdepends = bzip2: use bzip2 in your apps, also required to build some pocketbook apps
- optdepends = giflib: use giflib in your apps, also required to build some pocketbook apps
- options = !strip
- options = !libtool
- source = https://datapacket.dl.sourceforge.net/project/pocketbook-free/PocketBook_Pro_SDK_Linux_1.1/sdkrelease_1_1a.tar.gz
- md5sums = 814aca54f7edf4b8c4d9469b455e0866
+ depends = ttf-sazanami
+ depends = nas
-pkgname = pocketbook-pro-sdk-linux
+pkgname = yarxi
diff --git a/PKGBUILD b/PKGBUILD
index b21819116bc..e21a86c2f39 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,61 +1,89 @@
+# Maintainer Seva Alekseyev <sevaa@yarxi.ru>
# Maintainer Stoyan Minaev <stoyan.minaev@gmail.com>
pkgbase=pkgbase
-pkgname=pocketbook-pro-sdk-linux
-pkgver=1.1
-_pkgver=1_1a
+pkgname=yarxi
+pkgver=1.10
pkgrel=1
-pkgdesc="Pocketbook-Pro SDK for Linux"
-url="https://sourceforge.net/projects/pocketbook-free/files/PocketBook_Pro_SDK_Linux_1.1/"
+pkgdesc="Japanese-Russian kanji and word dictionary"
+url="http://www.susi.ru/yarxi/"
license=('custom')
-source=("https://datapacket.dl.sourceforge.net/project/pocketbook-free/PocketBook_Pro_SDK_Linux_${pkgver}/sdkrelease_${_pkgver}.tar.gz")
+_source=(
+ "http://www.susi.ru/yarxi/yarxi_${pkgver}-${pkgrel}_amd64.deb"
+ "http://ftp.uk.debian.org/debian/pool/main/q/qt4-x11/libqtcore4_4.8.7+dfsg-11_amd64.deb"
+ "http://ftp.uk.debian.org/debian/pool/main/q/qt4-x11/libqtgui4_4.8.7+dfsg-11_amd64.deb"
+ "http://ftp.uk.debian.org/debian/pool/main/q/qt4-x11/libqt4-network_4.8.7+dfsg-11_amd64.deb"
+)
arch=('x86_64')
-md5sums=('814aca54f7edf4b8c4d9469b455e0866')
-optdepends=(
- "cmake: build some pocketbook apps from /usr/share/${pkgname}/sources/"
- "freetype2: use freetype in your apps, also required to build some pocketbook apps"
- "gtk2: use GTK2 in your apps, also required to build some pocketbook apps"
- "bzip2: use bzip2 in your apps, also required to build some pocketbook apps"
- "giflib: use giflib in your apps, also required to build some pocketbook apps"
+_md5sums=(
+ '812d2265816ed781751c5c0eb6664d91'
+ 'b243ada8569b2b3d4586dc4178fd8d56'
+ '797e351a57c9d56368f710e7cba40f21'
+ 'b3cff12767e21d3a76794046557d3df0'
+)
+depends=(
+ ttf-sazanami nas
)
-options=('!strip' '!libtool')
prepare() {
cd $srcdir/
- echo "Replacing TOOLCHAIN_PATH in sources/*/CMakeLists.txt and removing useless CMAKE_CURRENT_SOURCE_DIR variable ..."
- for cmake_lists_txt in $(find -name CMakeLists.txt); do
- sed -i $cmake_lists_txt -e 's#../../FRSCSDK#/opt/frscsdk#g' -e 's#../../PBSDK#/opt/pbsdk#g' -e 's#${CMAKE_CURRENT_SOURCE_DIR}/##g'
+ echo "Due to 'makepkg' and 'PKGBUILD' specs limitations I need to dowanload sources and validate them by myself"
+ for source_url in ${_source[@]}; do
+ source_filename=${source_url##*/}
+ if [ ! -f "$source_filename" ]; then
+ echo "Downloading next source - $source_filename ..."
+ curl -A DUMMY -O "$source_url";
+ else
+ echo "Found already downloaded source - $source_filename"
+ fi
+ done
+ echo "And now we must validated dowanloaded sources ..."
+ for (( i=0; i<${#_source[@]}; ++i )); do
+ source_url=${_source[i]}
+ source_filename=${source_url##*/}
+ source_expected_md5sum=${_md5sums[i]}
+ source_actual_md5sum=$(md5sum $source_filename | awk '{print $1}')
+ if [ "$source_actual_md5sum" == "$source_expected_md5sum" ]; then
+ echo "Validated next source - $source_filename"
+ else
+ echo "Found corrupted source - $source_filename"; return 1
+ fi
+ done
+}
+
+build() {
+ cd $srcdir/
+ mkdir -p deb/{$pkgname,qt4core,qt4gui,qt4network}
+ bsdtar xf yarxi_${pkgver}-${pkgrel}_amd64.deb -C deb/$pkgname/
+ bsdtar xf libqtcore4_4.8.7+dfsg-11_amd64.deb -C deb/qt4core/
+ bsdtar xf libqtgui4_4.8.7+dfsg-11_amd64.deb -C deb/qt4gui/
+ bsdtar xf libqt4-network_4.8.7+dfsg-11_amd64.deb -C deb/qt4network/
+ for dir in deb/$pkgname deb/qt4core deb/qt4gui deb/qt4network; do
+ cd $dir; tar xf data.tar.*; cd $srcdir
done
}
package() {
cd $srcdir/
- # create required directories
- mkdir -p $pkgdir/opt/ $pkgdir/usr/share/${pkgname}/
- # install FRSCSDK to /opt/frscsdk & fix permissions
- cp -r FRSCSDK/ $pkgdir/opt/frscsdk
- find $pkgdir/opt/frscsdk/ -type d -exec chmod 0755 {} \;
- find $pkgdir/opt/frscsdk/ -type f -exec chmod 0644 {} \;
- find $pkgdir/opt/frscsdk/arm-none-linux-gnueabi/bin/ -type f -exec chmod 0755 {} \;
- find $pkgdir/opt/frscsdk/arm-none-linux-gnueabi/sysroot/usr/bin/ -type f -exec chmod 0755 {} \;
- find $pkgdir/opt/frscsdk/arm-none-linux-gnueabi/sysroot/vfp/usr/bin/ -type f -exec chmod 0755 {} \;
- find $pkgdir/opt/frscsdk/bin/ -type f -exec chmod 0755 {} \;
- find $pkgdir/opt/frscsdk/libexec/ -type f -exec chmod 0755 {} \;
- # install PBSDK to /opt/pbsdk & fix permissions
- cp -r PBSDK/ $pkgdir/opt/pbsdk
- find $pkgdir/opt/pbsdk/ -type d -exec chmod 0755 {} \;
- find $pkgdir/opt/pbsdk/ -type f -exec chmod 0644 {} \;
- find $pkgdir/opt/pbsdk/arm-linux/bin/ -type f -exec chmod 0755 {} \;
- find $pkgdir/opt/pbsdk/bin/ -type f -exec chmod 0755 {} \;
- find $pkgdir/opt/pbsdk/libexec/ -type f -exec chmod 0755 {} \;
- # install sources of some pocketbook apps & fix broken links
- cp -r sources/ $pkgdir/usr/share/${pkgname}/
- find $pkgdir/usr/share/${pkgname}/sources/ -type l -name system -exec ln -fs /usr/share/${pkgname}/system {} \;
- # install copy of /mnt/ext1/system
- cp -r system/ $pkgdir/usr/share/${pkgname}/
- # fix permissions in /usr/share/${pkgname}
- find $pkgdir/usr/share/${pkgname}/ -type d -exec chmod 755 {} \;
- find $pkgdir/usr/share/${pkgname}/ -type f -exec chmod 644 {} \;
+ mkdir -p $pkgdir/usr/lib/
+ mkdir -p $pkgdir/usr/bin/
+ mkdir -p $pkgdir/usr/share/
+ mkdir -p $pkgdir/usr/share/applications/
+ mkdir -p $pkgdir/usr/share/doc/$pkgname/
+ mkdir -p $pkgdir/usr/share/icons/hicolor/{16x16/apps,32x32/apps,48x48/apps}/
+ mkdir -p $pkgdir/usr/share/pixmaps/
+ mkdir -p $pkgdir/usr/share/$pkgname/
+ install -m 0755 $srcdir/deb/$pkgname/usr/bin/$pkgname $pkgdir/usr/bin/$pkgname
+ install -m 0755 $srcdir/deb/qt4core/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7 $pkgdir/usr/lib/libQtCore.so.4
+ install -m 0755 $srcdir/deb/qt4gui/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7 $pkgdir/usr/lib/libQtGui.so.4
+ install -m 0755 $srcdir/deb/qt4network/usr/lib/x86_64-linux-gnu/libQtNetwork.so.4.8.7 $pkgdir/usr/lib/libQtNetwork.so.4
+ install -m 0644 $srcdir/deb/$pkgname/usr/share/applications/seva-yarxi.desktop $pkgdir/usr/share/applications/
+ install -m 0644 $srcdir/deb/$pkgname/usr/share/doc/$pkgname/copyright $pkgdir/usr/share/doc/$pkgname/
+ for icons in 16x16 32x32 48x48; do
+ install -m 0644 $srcdir/deb/$pkgname/usr/share/icons/hicolor/$icons/apps/seva-yarxi.png $pkgdir/usr/share/icons/hicolor/$icons/apps/
+ done
+ install -m 0644 $srcdir/deb/$pkgname/usr/share/pixmaps/*.xpm $pkgdir/usr/share/pixmaps/
+ install -m 0644 $srcdir/deb/$pkgname/usr/share/$pkgname/yarxice.db $pkgdir/usr/share/$pkgname/
}
#vim: syntax=sh