-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f183f0c
commit 515f2ac
Showing
3 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Maintainer: Detlef Groth <your@email.com> | ||
|
||
pkgname=microemacs | ||
pkgver=24.09.02 | ||
pkgrel=1 | ||
pkgdesc="Jasspa MicroEmacs Text Editor" | ||
arch=('x86_64') | ||
url="https://github.com/bjasspa/jasspa" | ||
license=('GPL') | ||
source=("mec.exe" "mew.exe","readme.txt" "COPYING.txt", "macros/") | ||
sha256sums=( | ||
'digest-mec.exe' | ||
'digest-mew.exe' | ||
'digest-readme.txt' | ||
'digest-COPYING.txt' | ||
'SKIP') | ||
|
||
package() { | ||
install -Dm755 "${srcdir}/bin/windows100-intel32/mec.exe" "${pkgdir}/usr/bin/mec.exe" | ||
install -Dm755 "${srcdir}/bin/windows100-intel32/mec.exe" " "${pkgdir}/usr/bin/mew.exe" | ||
install -Dm644 "${srcdir}/readme.txt" "${pkgdir}/usr/share/jasspa/readme.txt" | ||
install -Dm644 "${srcdir}/COPYING.txt" "${pkgdir}/usr/share/jasspa/COPYING.txt" | ||
install -Dm644 "${srcdir}/macros/*" "${pkgdir}/usr/share/jasspa/macros/*" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
function tpl2pkg { | ||
if [ -z $2 ]; then | ||
printf "tpl2pkg VERSION TEMPLATE\n" | ||
else | ||
version=$(echo $1 | sed -E 's/.+MicroEmacs_([0-9]+).+/\1/') #' | ||
outfile=$(echo $2 | sed -E 's/.tpl$//') | ||
printf "$version $outfile\n" | ||
dld="https://github.com/bjasspa/jasspa/releases/download/me_${version}" | ||
if [ ! -f "Jasspa_MicroEmacs_${version}_bin_windows_binaries.zip" ]; then | ||
wget "${dld}/Jasspa_MicroEmacs_${version}_bin_windows_binaries.zip" | ||
fi | ||
if [ ! -f "Jasspa_MicroEmacs_${version}_macros.zip" ]; then | ||
wget "${dld}/Jasspa_MicroEmacs_${version}_macros.zip" | ||
fi | ||
if [ ! -f "Jasspa_MicroEmacs_${version}_help_ehf.zip" ]; then | ||
wget "${dld}/Jasspa_MicroEmacs_${version}_help_ehf.zip" | ||
fi | ||
if [ -d "microemacs-package" ]; then | ||
rm -rf microemacs-package | ||
fi | ||
mkdir microemacs-package | ||
unzip -o Jasspa_MicroEmacs_${version}_bin_windows_binaries.zip -d microemacs-package | ||
unzip -o Jasspa_MicroEmacs_${version}_macros.zip -d microemacs-package | ||
unzip -o Jasspa_MicroEmacs_${version}_help_ehf.zip -d microemacs-package | ||
mv microemacs-package/bin/*/me?.exe microemacs-package/ | ||
dig=$(sha256sum microemacs-package/mec.exe | cut -c 1-64) | ||
sed -E "s/digest-mec.exe/${dig}/" $2 > microemacs-package/PKGBUILD | ||
dig=$(sha256sum microemacs-package/mew.exe | cut -c 1-64) | ||
sed -i -E "s/digest-mew.exe/${dig}/" microemacs-package/PKGBUILD | ||
dig=$(sha256sum microemacs-package/readme.txt | cut -c 1-64) | ||
sed -i -E "s/digest-readme.txt/${dig}/" microemacs-package/PKGBUILD | ||
dig=$(sha256sum microemacs-package/COPYING.txt | cut -c 1-64) | ||
sed -i -E "s/digest-COPYING.txt/${dig}/" microemacs-package/PKGBUILD | ||
fi | ||
} | ||
|
||
tpl2pkg $1 $2 |