Compare commits
4 Commits
16da064a24
...
ac9a970bab
Author | SHA1 | Date | |
---|---|---|---|
ac9a970bab | |||
ff810caf10 | |||
6240cb0a34 | |||
f782b24d84 |
@ -1,5 +1,6 @@
|
|||||||
# debfetcher
|
# 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
|
## Features
|
||||||
- apt signature and package checksum verification
|
- 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.
|
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)
|
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
|
## 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.
|
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
|
DEBFETCHER_CONFIG="/path/to/debfetcher.user.conf" ./debfetcher.sh get signal
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note: The config directories don't change.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
### Install a package
|
### Install a package
|
||||||
```
|
```
|
||||||
|
@ -78,14 +78,40 @@ print_usage()
|
|||||||
|
|
||||||
verify_sig()
|
verify_sig()
|
||||||
{
|
{
|
||||||
|
set +e
|
||||||
gpg --no-default-keyring --keyring "$1" --quiet --verify 2> "${CACHE_DIR}/last_gnupg_verify_result"
|
gpg --no-default-keyring --keyring "$1" --quiet --verify 2> "${CACHE_DIR}/last_gnupg_verify_result"
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
fail "Signature check failed"
|
fail "Signature check failed - See "${CACHE_DIR}/last_gnupg_verify_result""
|
||||||
fi
|
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()
|
debfetcher_install()
|
||||||
{
|
{
|
||||||
TEMPLATE_NAME=$(basename "$1")
|
TEMPLATE_NAME=$(basename "$1")
|
||||||
|
@ -7,22 +7,6 @@ PACKAGE="brave-browser"
|
|||||||
TS=$(date +%s)
|
TS=$(date +%s)
|
||||||
THIS_BASEDIR="/opt/brave.com"
|
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()
|
install()
|
||||||
{
|
{
|
||||||
cp -a --parents -- opt/brave.com "${DEBFETCHER_INSTALL_DESTDIR}"
|
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
|
|
||||||
}
|
|
||||||
|
@ -7,21 +7,6 @@ PACKAGE="signal-desktop"
|
|||||||
TS=$(date +%s)
|
TS=$(date +%s)
|
||||||
THIS_BASEDIR="/opt/Signal"
|
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()
|
install()
|
||||||
{
|
{
|
||||||
#Inspired by Gentoo's ebuild
|
#Inspired by Gentoo's ebuild
|
||||||
@ -34,11 +19,3 @@ install()
|
|||||||
|
|
||||||
ln -sf ${DEBFETCHER_INSTALL_DESTDIR}/opt/Signal/signal-desktop "${DEBFETCHER_BIN_SYMLINK_DIR}"
|
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
Normal file
17
packages/spotify.debfetcher
Normal file
@ -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
pubkeys/spotify-keyring-7A3A762FAFD4A51F.gpg
Normal file
BIN
pubkeys/spotify-keyring-7A3A762FAFD4A51F.gpg
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user