mirror of
https://github.com/rwinkhart/sshyp-labs.git
synced 2026-09-03 07:37:37 -04:00
Brought packaging in-line with sshyp
This commit is contained in:
+24
-21
@@ -33,7 +33,7 @@ pkgdesc='An MFA (TOTP/Steam) key generator for the sshyp password manager'
|
|||||||
url='https://github.com/rwinkhart/sshyp-labs'
|
url='https://github.com/rwinkhart/sshyp-labs'
|
||||||
arch=('any')
|
arch=('any')
|
||||||
license=('GPL-3.0-only')
|
license=('GPL-3.0-only')
|
||||||
depends=(sshyp python)
|
depends=(sshyp)
|
||||||
source=(\""$source"\")
|
source=(\""$source"\")
|
||||||
sha512sums=('"$sha512"')
|
sha512sums=('"$sha512"')
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ options=!check
|
|||||||
url='https://github.com/rwinkhart/sshyp-labs'
|
url='https://github.com/rwinkhart/sshyp-labs'
|
||||||
arch='noarch'
|
arch='noarch'
|
||||||
license='GPL-3.0-only'
|
license='GPL-3.0-only'
|
||||||
depends='sshyp python3'
|
depends='sshyp'
|
||||||
source=\""$source"\"
|
source=\""$source"\"
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
@@ -75,7 +75,7 @@ sha512sums=\"
|
|||||||
|
|
||||||
_create_hpkg() {
|
_create_hpkg() {
|
||||||
echo -e '\npackaging for Haiku...\n'
|
echo -e '\npackaging for Haiku...\n'
|
||||||
mkdir -p output/haikutemp/{bin,documentation/{man/man1,output/sshyp-mfa}}
|
mkdir -p output/haikutemp/{bin,lib/sshyp,documentation/{man/man1,sshyp-mfa}}
|
||||||
echo "name sshypmfa
|
echo "name sshypmfa
|
||||||
version "$version"-"$revision"
|
version "$version"-"$revision"
|
||||||
architecture any
|
architecture any
|
||||||
@@ -84,7 +84,7 @@ description \"sshyp-mfa is an extension for the sshyp password manager that rea
|
|||||||
packager \"Randall Winkhart <idgr at tutanota dot com>\"
|
packager \"Randall Winkhart <idgr at tutanota dot com>\"
|
||||||
vendor \"Randall Winkhart\"
|
vendor \"Randall Winkhart\"
|
||||||
licenses {
|
licenses {
|
||||||
\"GPL-3.0-only\"
|
\"GNU GPL v3\"
|
||||||
}
|
}
|
||||||
copyrights {
|
copyrights {
|
||||||
\"2021-2022 Randall Winkhart\"
|
\"2021-2022 Randall Winkhart\"
|
||||||
@@ -95,21 +95,20 @@ provides {
|
|||||||
}
|
}
|
||||||
requires {
|
requires {
|
||||||
sshyp
|
sshyp
|
||||||
python3
|
|
||||||
}
|
}
|
||||||
urls {
|
urls {
|
||||||
\"https://github.com/rwinkhart/sshyp-labs\"
|
\"https://github.com/rwinkhart/sshyp-labs\"
|
||||||
}
|
}
|
||||||
" > output/haikutemp/.PackageInfo
|
" > output/haikutemp/.PackageInfo
|
||||||
cp -r lib/. output/haikutemp/boot/system/lib/sshyp/
|
cp -r lib/. output/haikutemp/lib/sshyp/
|
||||||
sed -i '1 s/.*/#!\/bin\/env\ python3/' output/haikutemp/boot/system/lib/sshyp/sshyp-mfa.py
|
sed -i '1 s/.*/#!\/bin\/env\ python3.10/' output/haikutemp/lib/sshyp/sshyp-mfa.py
|
||||||
ln -s /boot/system/lib/sshyp/sshyp-mfa.py output/haikutemp/bin/sshyp-mfa
|
ln -s /system/lib/sshyp/sshyp-mfa.py output/haikutemp/bin/sshyp-mfa
|
||||||
cp -r share/licenses/sshyp-mfa/ output/haikutemp/documentation/output/
|
cp -r share/licenses/sshyp-mfa/ output/haikutemp/documentation/sshyp-mfa/
|
||||||
cp extra/manpage output/haikutemp/documentation/man/man1/sshyp-mfa.1
|
cp extra/manpage output/haikutemp/documentation/man/man1/sshyp-mfa.1
|
||||||
gzip output/haikutemp/documentation/man/man1/sshyp-mfa.1
|
gzip output/haikutemp/documentation/man/man1/sshyp-mfa.1
|
||||||
cd output/haikutemp
|
cd output/haikutemp
|
||||||
package create -b sshyp-mfa-"$version"-"$revision"_all.hpkg
|
package create -b sshyp-mfa-"$version"-"$revision"_all.hpkg
|
||||||
package add sshyp-mfa-"$version"-"$revision"_all.hpkg bin boot documentation
|
package add sshyp-mfa-"$version"-"$revision"_all.hpkg bin lib documentation
|
||||||
cd ../..
|
cd ../..
|
||||||
mv output/haikutemp/sshyp-mfa-"$version"-"$revision"_all.hpkg output/
|
mv output/haikutemp/sshyp-mfa-"$version"-"$revision"_all.hpkg output/
|
||||||
rm -rf output/haikutemp
|
rm -rf output/haikutemp
|
||||||
@@ -125,7 +124,7 @@ Section: utils
|
|||||||
Architecture: all
|
Architecture: all
|
||||||
Maintainer: Randall Winkhart <idgr at tutanota dot com>
|
Maintainer: Randall Winkhart <idgr at tutanota dot com>
|
||||||
Description: An MFA (TOTP/Steam) key generator for the sshyp password manager
|
Description: An MFA (TOTP/Steam) key generator for the sshyp password manager
|
||||||
Depends: sshyp, python3
|
Depends: sshyp
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Installed-Size: 100
|
Installed-Size: 100
|
||||||
" > output/debiantemp/sshyp-mfa_"$version"-"$revision"_all/DEBIAN/control
|
" > output/debiantemp/sshyp-mfa_"$version"-"$revision"_all/DEBIAN/control
|
||||||
@@ -149,7 +148,7 @@ Section: utils
|
|||||||
Architecture: all
|
Architecture: all
|
||||||
Maintainer: Randall Winkhart <idgr at tutanota dot com>
|
Maintainer: Randall Winkhart <idgr at tutanota dot com>
|
||||||
Description: An MFA (TOTP/Steam) key generator for the sshyp password manager
|
Description: An MFA (TOTP/Steam) key generator for the sshyp password manager
|
||||||
Depends: sshyp, python3
|
Depends: sshyp
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Installed-Size: 100
|
Installed-Size: 100
|
||||||
" > output/termuxtemp/sshyp-mfa_"$version"-"$revision"_all_termux/DEBIAN/control
|
" > output/termuxtemp/sshyp-mfa_"$version"-"$revision"_all_termux/DEBIAN/control
|
||||||
@@ -177,7 +176,7 @@ BuildArch: noarch
|
|||||||
License: GPL-3.0-only
|
License: GPL-3.0-only
|
||||||
URL: https://github.com/rwinkhart/sshyp-labs
|
URL: https://github.com/rwinkhart/sshyp-labs
|
||||||
Source0: sshyp-mfa-"$version".tar.xz
|
Source0: sshyp-mfa-"$version".tar.xz
|
||||||
Requires: sshyp python
|
Requires: sshyp
|
||||||
%description
|
%description
|
||||||
sshyp-mfa is an extension for the sshyp password manager that reads MFA data from sshyp entries and generates generic TOTP and Steam keys.
|
sshyp-mfa is an extension for the sshyp password manager that reads MFA data from sshyp entries and generates generic TOTP and Steam keys.
|
||||||
%install
|
%install
|
||||||
@@ -212,9 +211,6 @@ prefix: /
|
|||||||
\"sshyp\" : {
|
\"sshyp\" : {
|
||||||
\"origin\" : \"security/sshyp\"
|
\"origin\" : \"security/sshyp\"
|
||||||
},
|
},
|
||||||
\"python\" : {
|
|
||||||
\"origin\" : \"lang/python\"
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
" > output/freebsdtemp/+MANIFEST
|
" > output/freebsdtemp/+MANIFEST
|
||||||
echo "/usr/bin/sshyp-mfa
|
echo "/usr/bin/sshyp-mfa
|
||||||
@@ -240,10 +236,6 @@ elif [ "$1" == "pkgbuild" ]; then
|
|||||||
elif [ "$1" == "apkbuild" ]; then
|
elif [ "$1" == "apkbuild" ]; then
|
||||||
_create_generic
|
_create_generic
|
||||||
_create_apkbuild
|
_create_apkbuild
|
||||||
elif [ "$1" == "scripts" ]; then
|
|
||||||
_create_generic
|
|
||||||
_create_pkgbuild
|
|
||||||
_create_apkbuild
|
|
||||||
elif [ "$1" == "haiku" ]; then # distribution packages
|
elif [ "$1" == "haiku" ]; then # distribution packages
|
||||||
_create_hpkg
|
_create_hpkg
|
||||||
elif [ "$1" == "debian" ]; then
|
elif [ "$1" == "debian" ]; then
|
||||||
@@ -255,6 +247,17 @@ elif [ "$1" == "fedora" ]; then
|
|||||||
_create_rpm
|
_create_rpm
|
||||||
elif [ "$1" == "freebsd" ]; then
|
elif [ "$1" == "freebsd" ]; then
|
||||||
_create_freebsd_pkg
|
_create_freebsd_pkg
|
||||||
|
elif [ "$1" == "buildable-arch" ]; then
|
||||||
|
_create_generic
|
||||||
|
_create_pkgbuild
|
||||||
|
_create_apkbuild
|
||||||
|
if [[ $(pacman -Q dpkg) == "dpkg"* ]]; then
|
||||||
|
_create_deb
|
||||||
|
_create_termux
|
||||||
|
fi
|
||||||
|
if [[ "$(pacman -Q freebsd-pkg)" == "freebsd-pkg"* ]]; then
|
||||||
|
_create_freebsd_pkg
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo -e '\nusage: package.sh [target] <revision>\n\ntargets:\n mainline: pkgbuild apkbuild haiku fedora debian\n experimental: freebsd\ntermux\n coming soon: appimage(mainline) openbsd(mainline) macos(experimental)\n'
|
echo -e '\nusage: package.sh [target] <revision>\n\ntargets:\n mainline: pkgbuild apkbuild haiku fedora debian\n experimental: freebsd termux\n other: buildable-arch\n'
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user