Commits vergleichen

...

4 Commits

6 geänderte Dateien mit 50 neuen und 54 gelöschten Zeilen

Datei anzeigen

@ -1,5 +1,6 @@
# debfetcher
debfetcher automates fetching and installing certain .deb packages from apt repos.
debfetcher enables fetching, installing and updating certain .deb packages from apt repos for non-Debian
distributions.
## Features
- apt signature and package checksum verification
@ -11,7 +12,7 @@ Often they are not available in the repos of others distros. Even if they are, s
Examples for such packages are: Brave, Signal-Desktop, Element-Desktop, Spotify etc.
debfetcher can fetch such packages from the official apt repos.
debfetcher can fetch such packages from the official apt repos and keep them up to date.
The binaries in the .deb actually work on other distributions (often)
@ -64,7 +65,7 @@ A template contains the repo URI, package name etc and specifies where to extrac
```
## User-level installation
If you don't need/want a system-wide installation , debfetcher can be used to install a package in your local user profile. Therefore, debfetcher can be used without polluting your /.
If you don't need/want a system-wide installation of a package, debfetcher can be used to install a package in your local user profile. Therefore, debfetcher can be used without polluting your /.
Refer to `debfetcher.user.conf.sample` to change the appropriate settings.
@ -73,6 +74,8 @@ Execute
DEBFETCHER_CONFIG="/path/to/debfetcher.user.conf" ./debfetcher.sh get signal
```
Note: The config directories don't change.
## Usage
### Install a package
```

Datei anzeigen

@ -78,14 +78,40 @@ print_usage()
verify_sig()
{
set +e
gpg --no-default-keyring --keyring "$1" --quiet --verify 2> "${CACHE_DIR}/last_gnupg_verify_result"
if [ $? -ne 0 ] ; then
fail "Signature check failed"
fail "Signature check failed - See "${CACHE_DIR}/last_gnupg_verify_result""
fi
set -e
}
# default presets for templates
remove()
{
rm -rf -- "${DEBFETCHER_INSTALL_DESTDIR}/${THIS_BASEDIR}"
}
pre_install()
{
CURRENT_DIR="${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}"
if [ -d "${CURRENT_DIR}" ] ; then
mv -- "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}" "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}_${TS}"
fi
}
post_install()
{
if [ ${KEEP_OLD} -eq 0 ] ; then
rm -rf -- "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}_${TS}"
fi
}
debfetcher_install()
{
TEMPLATE_NAME=$(basename "$1")

Datei anzeigen

@ -7,22 +7,6 @@ PACKAGE="brave-browser"
TS=$(date +%s)
THIS_BASEDIR="/opt/brave.com"
remove()
{
rm -rf -- "${DEBFETCHER_INSTALL_DESTDIR}/${THIS_BASEDIR}"
}
pre_install()
{
CURRENT_DIR="${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}"
if [ -d "${CURRENT_DIR}" ] ; then
mv -- "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}" "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}_${TS}"
fi
}
install()
{
cp -a --parents -- opt/brave.com "${DEBFETCHER_INSTALL_DESTDIR}"
@ -31,14 +15,3 @@ install()
}
post_install()
{
if [ ${KEEP_OLD} -eq 0 ] ; then
rm -rf -- "${DEBFETCHER_INSTALL_DESTDIR}/opt/brave.com_${TS}"
fi
sourcepath=$(realpath "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}/brave/brave-browser")
ln -sf "${sourcepath}" "${DEBFETCHER_BIN_SYMLINK_DIR}/"
sed -e "s;Exec=/;Exec=${DEBFETCHER_BIN_SYMLINK_DIR};" -i "${DEBFETCHER_INSTALL_DESTDIR}"/usr/share/applications/brave-browser.desktop
}

Datei anzeigen

@ -7,21 +7,6 @@ PACKAGE="signal-desktop"
TS=$(date +%s)
THIS_BASEDIR="/opt/Signal"
remove()
{
rm -rf -- "${DEBFETCHER_INSTALL_DESTDIR}/${THIS_BASEDIR}"
}
pre_install()
{
CURRENT_DIR="${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}"
if [ -d "${CURRENT_DIR}" ] ; then
mv -- "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}" "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}_${TS}"
fi
}
install()
{
#Inspired by Gentoo's ebuild
@ -34,11 +19,3 @@ install()
ln -sf ${DEBFETCHER_INSTALL_DESTDIR}/opt/Signal/signal-desktop "${DEBFETCHER_BIN_SYMLINK_DIR}"
}
post_install()
{
if [ ${KEEP_OLD} -eq 0 ] ; then
rm -rf -- "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}_${TS}"
fi
}

17
packages/spotify.debfetcher Normale Datei
Datei anzeigen

@ -0,0 +1,17 @@
APTURL="http://repository.spotify.com"
DISTRO="stable"
REPO="non-free"
PUBKEY="${PUBKEY_PATH}/spotify-keyring-7A3A762FAFD4A51F.gpg"
PACKAGE="spotify-client"
TS=$(date +%s)
THIS_BASEDIR="/opt/spotify"
install()
{
mkdir -p ${DEBFETCHER_INSTALL_DESTDIR}/${THIS_BASEDIR}
patchelf --replace-needed libcurl-gnutls.so.4 libcurl.so.4 usr/share/spotify/spotify
cp -a usr/share/spotify/* ${DEBFETCHER_INSTALL_DESTDIR}/${THIS_BASEDIR}
ln -sf ${DEBFETCHER_INSTALL_DESTDIR}/opt/spotify/spotify "${DEBFETCHER_BIN_SYMLINK_DIR}"
}

Binäre Datei nicht angezeigt.