Browse Source

README updated. Some bugfixes.

sisyphus
JezerM 3 years ago
parent
commit
27629754ad
No known key found for this signature in database
GPG Key ID: 66BBC5D01388C6B5
  1. 15
      README.md
  2. 51
      build/utils.sh

15
README.md

@ -22,12 +22,13 @@ Gruvbox and Dracula themes!
- Tab completion for zsh and bash.
## Dependencies
| | arch | ubuntu | fedora | openSUSE |
|-----------------------|---------------|----------------------|---------------------|-----------------------|
|**liblightdm-gobject** |lightdm |liblightdm-gobject-dev|lightdm-gobject-devel|liblightdm-gobject-1-0 |
|**pygobject** |python-gobject |python3-gi |pygobject3 |python3-gobject |
|**pyqt5** |python-pyqt5 |python3-pyqt5 |python3-qt5 |python3-qt5 |
|**qt5-webengine** |qt5-webengine |libqt5webengine5 |qt5-qtwebengine |libqt5-qtwebengine |
| | arch | ubuntu | fedora | openSUSE |
|--------------------------|---------------------|----------------------|---------------------|----------------------|
|**liblightdm-gobject** |lightdm |liblightdm-gobject-dev|lightdm-gobject-devel|liblightdm-gobject-1-0|
|**pygobject** |python-gobject |python3-gi |pygobject3 |python3-gobject |
|**pyqt5** |python-pyqt5 |python3-pyqt5 |python3-qt5 |python3-qt5 |
|**qt5-webengine** |qt5-webengine |libqt5webengine5 |qt5-qtwebengine |libqt5-qtwebengine |
|**gobject-introspection** |gobject-introspection|gobject-introspection |gobject-introspection|gobject-introspection |
### PIP
- PyGObject
@ -52,7 +53,7 @@ sudo pip install -r requirements.txt
sudo make install
```
Whis will build and install **web-greeter** in a zippy way, which compresses the python code as a zip and uses it as a binary. Either `sudo make install_freeze` to build and install with cx_freeze. The zippy method depends on the actual python interpreter and its libraries, so you could have problems when updating python or removing any dependency, while the cx_freeze method tries to fix this "problem".
This will build and install **web-greeter** in a zippy way, which compresses the python code as a zip and uses it as a binary. Either `sudo make install_freeze` to build and install with cx_freeze. The zippy method depends on the actual python interpreter and its libraries, so you could have problems when updating python or removing any dependency, while the cx_freeze method tries to fix this "problem".
See [latest release][releases].

51
build/utils.sh

@ -51,7 +51,11 @@ do_build_freeze() {
do_install() {
[[ -e "${DESTDIR}" ]] || mkdir -p "${DESTDIR}"
cp -R "${INSTALL_ROOT}"/* "${DESTDIR}"
[[ -e "${DESTDIR}"/opt/web-greeter ]] && ln -sf "${DESTDIR}"/opt/web-greeter/web-greeter ${DESTDIR}${PREFIX}/bin/web-greeter
if [[ -e "${DESTDIR}"/opt/web-greeter ]]; then
opt_web=$(echo "${DESTDIR}"/opt/web-greeter/web-greeter | sed -E 's/\/\//\//g')
dest_bin=$(echo "${DESTDIR}"/"${PREFIX}"/bin/web-greeter | sed -E 's/\/\//\//g')
ln -sf "${opt_web}" "${dest_bin}"
fi
}
init_build_dir() {
@ -64,37 +68,39 @@ init_build_dir() {
prepare_install() {
cd "${BUILD_DIR}"
INSTALL_PREFIX=$(echo ${INSTALL_ROOT}/${PREFIX} | sed -E 's/\/\//\//g')
mkdir -p \
"${INSTALL_ROOT}${PREFIX}"/share/{man/man1,metainfo,web-greeter,xgreeters,applications,zsh/vendor-completions,bash-completion/completions} \
"${INSTALL_ROOT}"/etc/{lightdm,xdg/lightdm/lightdm.conf.d}
"${INSTALL_PREFIX}"/share/{man/man1,metainfo,web-greeter,xgreeters,applications,zsh/vendor-completions,bash-completion/completions} \
"${INSTALL_ROOT}"/etc/{lightdm,xdg/lightdm/lightdm.conf.d} \
"${INSTALL_PREFIX}"/bin
# Themes
(cp -R "${REPO_DIR}/themes" "${INSTALL_ROOT}${PREFIX}/share/web-greeter" \
&& cd "${INSTALL_ROOT}${PREFIX}/share/web-greeter" \
(cp -R "${REPO_DIR}/themes" "${INSTALL_PREFIX}/share/web-greeter" \
&& cd "${INSTALL_PREFIX}/share/web-greeter" \
&& mv themes/_vendor .)
# Man Page
cp "${BUILD_DIR}/dist/${PKGNAME}.1" "${INSTALL_ROOT}${PREFIX}/share/man/man1"
cp "${BUILD_DIR}/dist/${PKGNAME}.1" "${INSTALL_PREFIX}/share/man/man1"
# Command line completions
if [[ -f /usr/bin/bash ]]; then
cp "${BUILD_DIR}/dist/${PKGNAME}-bash" "${INSTALL_ROOT}${PREFIX}/share/bash-completion/completions/${PKGNAME}"
cp "${BUILD_DIR}/dist/${PKGNAME}-bash" "${INSTALL_PREFIX}/share/bash-completion/completions/${PKGNAME}"
fi
if [[ -f /usr/bin/zsh ]]; then
cp "${BUILD_DIR}/dist/${PKGNAME}-zsh" "${INSTALL_ROOT}${PREFIX}/share/zsh/vendor-completions/_${PKGNAME}"
cp "${BUILD_DIR}/dist/${PKGNAME}-zsh" "${INSTALL_PREFIX}/share/zsh/vendor-completions/_${PKGNAME}"
fi
# Greeter Config
cp "${BUILD_DIR}/dist/${PKGNAME}.yml" "${INSTALL_ROOT}/etc/lightdm"
# AppData File
cp "${BUILD_DIR}/dist/${PKGNAME}.appdata.xml" "${INSTALL_ROOT}${PREFIX}/share/metainfo"
cp "${BUILD_DIR}/dist/${PKGNAME}.appdata.xml" "${INSTALL_PREFIX}/share/metainfo"
# Greeter desktop File
cp "${BUILD_DIR}/dist/web-xgreeter.desktop" "${INSTALL_ROOT}${PREFIX}/share/xgreeters/web-greeter.desktop"
cp "${BUILD_DIR}/dist/web-xgreeter.desktop" "${INSTALL_PREFIX}/share/xgreeters/web-greeter.desktop"
# Application desktop File
cp "${BUILD_DIR}/dist/web-greeter.desktop" "${INSTALL_ROOT}${PREFIX}/share/applications/web-greeter.desktop"
cp "${BUILD_DIR}/dist/web-greeter.desktop" "${INSTALL_PREFIX}/share/applications/web-greeter.desktop"
# Xgreeter wrapper
cp "${BUILD_DIR}/dist/90-greeter-wrapper.conf" \
@ -104,7 +110,7 @@ prepare_install() {
# Don't install hidden files
find "${INSTALL_ROOT}" -type f -name '.git*' -delete
rm -rf "${INSTALL_ROOT}/usr/share/web-greeter/themes/default/.tx"
rm -rf "${INSTALL_PREFIX}/share/web-greeter/themes/default/.tx"
if [[ "${DESTDIR}" != '/' ]]; then
# Save a list of installed files for uninstall command
@ -114,7 +120,7 @@ prepare_install() {
do
[[ -d "${_file}" && *'/web-greeter/'* != "${_file}" ]] && continue
echo "${_file##*/install_root}" >> "${INSTALL_ROOT}${PREFIX}/share/web-greeter/.installed_files"
echo "${_file##*/install_root}" >> "${INSTALL_PREFIX}/share/web-greeter/.installed_files"
done < /tmp/.installed_files
@ -124,41 +130,42 @@ prepare_install() {
do_uninstall() {
# Man Page
rm -f ${DESTDIR}${PREFIX}/share/man/man1/web-greeter.1
DESTDIR_PREFIX=$(echo ${DESTDIR}/${PREFIX} | sed -E 's/\/\//\//g')
rm -f ${DESTDIR_PREFIX}/share/man/man1/web-greeter.1
# Command line completions
if [[ -f /usr/bin/bash ]]; then
rm -f ${DESTDIR}${PREFIX}/share/bash-completion/completions/${PKGNAME}
rm -f ${DESTDIR_PREFIX}/share/bash-completion/completions/${PKGNAME}
fi
if [[ -f /usr/bin/zsh ]]; then
rm -f ${DESTDIR}${PREFIX}/share/zsh/vendor-completions/_${PKGNAME}
rm -f ${DESTDIR_PREFIX}/share/zsh/vendor-completions/_${PKGNAME}
fi
# Greeter Config
#rm ${DESTDIR}/etc/lightdm/${PKGNAME}.yml
# Themes
#rm -rf ${DESTDIR}${PREFIX}/share/web-greeter
#rm -rf ${DESTDIR_PREFIX}/share/web-greeter
# AppData File
rm -f ${DESTDIR}${PREFIX}/share/metainfo/${PKGNAME}.appdata.xml
rm -f ${DESTDIR_PREFIX}/share/metainfo/${PKGNAME}.appdata.xml
# Greeter desktop file
rm -f ${DESTDIR}${PREFIX}/share/xgreeters/web-greeter.desktop
rm -f ${DESTDIR_PREFIX}/share/xgreeters/web-greeter.desktop
# Application desktop file
rm -f ${DESTDIR}${PREFIX}/share/applications/web-greeter.desktop
rm -f ${DESTDIR_PREFIX}/share/applications/web-greeter.desktop
# XGreeter wrapper
rm -f ${DESTDIR}/etc/xdg/lightdm/lightdm.conf.d/90-greeter-wrapper.conf
rm -f ${DESTDIR}/etc/lightdm/Xgreeter
# Binary
rm -f ${DESTDIR}${PREFIX}/bin/web-greeter
rm -f ${DESTDIR_PREFIX}/bin/web-greeter
[[ -e "${DESTDIR}"/opt/web-greeter ]] && rm -rf ${DESTDIR}/opt/web-greeter
echo "Themes are not uninstalled. Remove them manually:
${DESTDIR}${PREFIX}/share/web-greeter/"
${DESTDIR_PREFIX}/share/web-greeter/"
echo "web-greeter config was not uninstalled. Remove it manually:
${DESTDIR}/etc/lightdm/${PKGNAME}.yml"
}

Loading…
Cancel
Save