diff options
author | watasuke102 | 2024-01-20 01:16:13 +0900 |
---|---|---|
committer | watasuke102 | 2024-01-20 01:16:13 +0900 |
commit | df35d485724be5ad7c046d19d06d3b99307b946e (patch) | |
tree | 5d42c571649cbea009019c83896e59acdd71984c | |
download | aur-df35d485724be5ad7c046d19d06d3b99307b946e.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 55 |
3 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..57655b91d5b1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,12 @@ +pkgbase = openplc-editor-git + pkgdesc = OpenPLC editor + pkgver = r184.f772039 + pkgrel = 1 + url = https://github.com/thiagoralves/OpenPLC_Editor + arch = x86_64 + license = GPL3 + makedepends = git + source = git+https://github.com/thiagoralves/OpenPLC_Editor.git + md5sums = SKIP + +pkgname = openplc-editor-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..8631db7dd9f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!PKGBUILD +!.SRCINFO + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d4c37743269e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: watasuke <watasuke102@gmail.com> +_pkgname=openplc-editor +pkgname="${_pkgname}-git" +pkgver=r184.f772039 +pkgrel=1 +pkgdesc="OpenPLC editor" +arch=("x86_64") +url="https://github.com/thiagoralves/OpenPLC_Editor" +source=("git+${url}.git") +license=("GPL3") +md5sums=("SKIP") +makedepends=("git") + +pkgver() { + cd "${srcdir}/OpenPLC_Editor" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "${srcdir}/OpenPLC_Editor" + cd matiec + autoreconf -i + ./configure --prefix="${pkgdir}" CXXFLAGS="-std=c++03" + make -s + cp ./iec2c ../editor/arduino/bin/ +} + +prepare() { + mkdir -p "${srcdir}/OpenPLC_Editor/.venv" + python3.8 -m venv "${srcdir}/OpenPLC_Editor/.venv" + "${srcdir}/OpenPLC_Editor/.venv/bin/python" -m pip install --upgrade pip + "${srcdir}/OpenPLC_Editor/.venv/bin/python" -m pip install wheel jinja2 lxml==4.6.2 future matplotlib zeroconf pyserial pypubsub pyro5 attrdict3 + "${srcdir}/OpenPLC_Editor/.venv/bin/python" -m pip install wxPython==4.2.0 + + echo -e "[Desktop Entry]\n\ +Name=OpenPLC Editor\n\ +Categories=Development;\n\ +Exec=\"/opt/OpenPLC_Editor/openplc_editor.sh\"\n\ +Icon=/opt/OpenPLC_Editor/editor/images/brz.png\n\ +Type=Application\n\ +Terminal=false" > OpenPLC_Editor.desktop + + cd "${srcdir}/OpenPLC_Editor" + echo -e "#!/bin/bash\n\ +cd \"/opt/OpenPLC_Editor\"\n\ +./.venv/bin/python3 ./editor/Beremiz.py" > openplc_editor.sh + chmod +x openplc_editor.sh +} + +package() { + install -dm755 "$pkgdir/opt" + cp -r "${srcdir}/OpenPLC_Editor" "$pkgdir/opt/OpenPLC_Editor" + install -Dm644 "OpenPLC_Editor.desktop" "${pkgdir}/usr/share/applications/OpenPLC_Editor.desktop" +} + |