diff options
author | Kyle Manna | 2017-12-21 23:10:21 -0800 |
---|---|---|
committer | Kyle Manna | 2017-12-21 23:10:21 -0800 |
commit | dd462a61eb4bae18a59a9927f3d3f066c6fc2297 (patch) | |
tree | ce3eca5e17c369895c642fd87c89b19a96c879a3 | |
download | aur-dd462a61eb4bae18a59a9927f3d3f066c6fc2297.tar.gz |
wavedrom-editor: Initial commit
* Add initial build.
* Crude but works.
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 99 | ||||
-rw-r--r-- | wavedrom-editor.desktop | 25 |
3 files changed, 142 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a2af8bbf5422 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +# Generated by mksrcinfo v8 +# Fri Dec 22 07:03:19 UTC 2017 +pkgbase = wavedrom-editor + pkgdesc = Timing diagram rendering engine + pkgver = 1.6.2 + pkgrel = 1 + url = http://wavedrom.com + arch = x86_64 + license = FIXME + source_x86_64 = wavedrom-editor-1.6.2::git+https://github.com/wavedrom/wavedrom.github.io.git#tag=v1.6.2 + source_x86_64 = http://dl.nwjs.io/v0.27.3/nwjs-v0.27.3-linux-x64.tar.gz + source_x86_64 = wavedrom-editor.desktop + sha256sums_x86_64 = SKIP + sha256sums_x86_64 = 1aef8354a3bf9714aab32595f27b142034332cb4e3a7381d3fd133a2937fd579 + sha256sums_x86_64 = c8cf2a7f6626452bb10eef4f8b4b02bf1992e360e93857a90b2ed7212044f1e2 + +pkgname = wavedrom-editor + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..829589cd4bf6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,99 @@ +# Maintainer: Kyle Manna <kyle(at)kylemanna(dot)com> + +pkgname=wavedrom-editor +pkgver=1.6.2 +pkgrel=1 +pkgdesc="Timing diagram rendering engine" +arch=('x86_64') +url="http://wavedrom.com" +license=('MIT') + +# For some reason, stripping the nwjs binary breaks the app +options=('!strip') + +sha256sums_x86_64=('SKIP' + '1aef8354a3bf9714aab32595f27b142034332cb4e3a7381d3fd133a2937fd579' + 'c8cf2a7f6626452bb10eef4f8b4b02bf1992e360e93857a90b2ed7212044f1e2') + +source_x86_64=("${pkgname}-${pkgver}::git+https://github.com/wavedrom/wavedrom.github.io.git#tag=v${pkgver}" + "http://dl.nwjs.io/v0.27.3/nwjs-v0.27.3-linux-x64.tar.gz" + "wavedrom-editor.desktop" +) + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Implement build-wde.sh + mkdir src + rm -rf src/* + + mkdir src/images + mkdir src/skins + mkdir src/css + mkdir src/scripts + + cp editor.js src/ + cp init.js src/ + cp editor.html src/ + cp tutorial.html src/ + cp WaveDromEditor/package.json src/ + cp wavedrom.min.js src/ + + cp images/ic_*.png src/images/ + cp images/favicon.ico src/images + cp images/logo.png src/images + cp skins/* src/skins + cp css/* src/css + cp scripts/* src/scripts + + #wget https://raw.githubusercontent.com/drom/simple-nwjs-app/master/build.sh -O build.sh + #bash build.sh --name wavedrom-editor --version v1.6.2 + + # Implement build.sh + NWV="v0.27.3" + V="${pkgver}" + N="${pkgname}" + P="linux-x64" + + mkdir -p build + rm -rf build/* + + # make app + pushd src && zip -r ../build/"$N"-$V.nw * && popd + + mkdir -p cache + rm -rf cache/*/* + + tar -xvf ${srcdir}/nwjs-$NWV-$P.tar.gz -C cache + + # clean cache + mkdir -p cache/"$N"-$V-$P + rm -rf cache/"$N"-$V-$P/* + cp -R cache/nwjs-$NWV-$P/* cache/"$N"-$V-$P + + # pack APP packages + cat cache/"$N"-$V-$P/nw build/"$N"-$V.nw > cache/"$N"-$V-$P/"$N" + chmod +x cache/"$N"-$V-$P/"$N" + rm cache/"$N"-$V-$P/nw + #pushd cache && tar -cvzf ../build/"$N"-$V-$P.tar.gz "$N"-$V-$P/* && popd +} + +# +# TODO: Placing the entire node-webkit build in /opt feels dirty if we just +# built the package, but scattering it around /usr feels worse. Is there +# a recommended psuedo-webapps convention? +# +package() { + # Copy build files + mkdir -p ${pkgdir}/opt + cp -a ${srcdir}/${pkgname}-${pkgver}/cache/${pkgname}-${pkgver}-linux-x64 ${pkgdir}/opt/${pkgname} + + # Symlink in to the default PATH + mkdir -p ${pkgdir}/usr/bin + ln -s /opt/wavedrom-editor/wavedrom-editor ${pkgdir}/usr/bin/wavedrom-editor + + # Create desktop icon + mkdir -p "${pkgdir}/usr/share/applications" "${pkgdir}/usr/share/pixmaps" + install -m644 "${srcdir}/wavedrom-editor.desktop" "$pkgdir/usr/share/applications/wavedrom-editor.desktop" + install -m644 "${srcdir}/${pkgname}-${pkgver}/images/icon_512.png" "$pkgdir/usr/share/pixmaps/wavedrom-editor.png" +} diff --git a/wavedrom-editor.desktop b/wavedrom-editor.desktop new file mode 100644 index 000000000000..8a5535193082 --- /dev/null +++ b/wavedrom-editor.desktop @@ -0,0 +1,25 @@ +[Desktop Entry] + +# The type as listed above +Type=Application + +# The version of the desktop entry specification to which this file complies +Version=2.4.0 + +# The name of the application +Name=WaveDrom Editor + +# A comment which can/will be used as a tooltip +Comment=Timing diagram rendering engine + +# The executable of the application. +Exec=wavedrom-editor + +# The name of the icon that will be used to display this entry +Icon=wavedrom-editor + +# Describes whether this application needs to be run in a terminal or not +Terminal=false + +# Describes the categories in which this entry should be shown +Categories=Development;Science;Graphics |