Browse Source

update Makefile (for real this time). few other small changes.

sisyphus
Dustin Falgout 8 years ago
parent
commit
6899920f3d
  1. 9
      Makefile
  2. 58
      build/utils.sh
  3. 7
      dist/com.antergos.web-greeter.appdata.xml
  4. 6
      themes/default/index.theme

9
Makefile

@ -3,7 +3,7 @@
DO := ./build/utils.sh
SET_CONFIG := $(DO) set-config
DESTDIR ?= /
MAYBE_SUDO := ''
MAYBE_SUDO_DO := $(DO)
define colorecho
@tput setaf 118 || true
@ -18,7 +18,7 @@ stays_on_top := False
endif
ifeq ($(DESTDIR),/)
MAYBE_SUDO := sudo
MAYBE_SUDO_DO := sudo $(DO)
endif
@ -58,13 +58,14 @@ build: _build_init _apply_config
$(DO) build
build_dev: install
sudo $(DO) install-dev
$(MAYBE_SUDO_DO) install-dev
clean:
$(DO) clean
install: build
$(MAYBE_SUDO) $(DO) install $(DESTDIR)
./build/utils.sh prepare-install
$(MAYBE_SUDO_DO) install $(DESTDIR)
$(call colorecho, SUCCESS!)

58
build/utils.sh

@ -10,8 +10,8 @@ DESTDIR=''
_handle_error() {
LASTLINE="$1"
LASTERR="$2"
echo "${BASH_SOURCE[0]}: line ${LASTLINE}: exit status of last command: ${LASTERR}"
exit 1
(>&2 echo "${BASH_SOURCE[0]}: line ${LASTLINE}: exit status of last command: ${LASTERR}")
exit "${LASTERR}"
}
clean_build_dir() {
@ -45,34 +45,8 @@ do_build() {
}
do_install() {
cd "${BUILD_DIR}"
mkdir -p \
"${INSTALL_ROOT}"/usr/share/{man/man1,metainfo,web-greeter,xgreeters} \
"${INSTALL_ROOT}/etc/lightdm"
# Themes
(cp -R "${REPO_DIR}/themes" "${INSTALL_ROOT}/usr/share/web-greeter" \
&& cd "${INSTALL_ROOT}/usr/share/web-greeter" \
&& mv themes/_vendor .)
# Man Page
cp "${BUILD_DIR}/dist/${PKGNAME}.1" "${INSTALL_ROOT}/usr/share/man/man1"
# Greeter Config
cp "${BUILD_DIR}/dist/${PKGNAME}.yml" "${INSTALL_ROOT}/etc/lightdm"
# AppData File
cp "${BUILD_DIR}/dist/com.antergos.${PKGNAME}.appdata.xml" "${INSTALL_ROOT}/usr/share/metainfo"
# Desktop File
cp "${BUILD_DIR}/dist/com.antergos.${PKGNAME}.desktop" "${INSTALL_ROOT}/usr/share/xgreeters"
# Do Install!
[[ -e "${DESTDIR}" ]] || mkdir -p "${DESTDIR}"
cp -R "${INSTALL_ROOT}"/* "${DESTDIR}"
# Fix Permissions
[[ -n "${SUDO_UID}" ]] && chown -R "${SUDO_UID}:${SUDO_GID}" "${BUILD_DIR}"
}
do_install_dev() {
@ -97,6 +71,30 @@ init_build_dir() {
cp -R -t "${BUILD_DIR}" "${REPO_DIR}/web-greeter" "${REPO_DIR}/dist"
}
prepare_install() {
cd "${BUILD_DIR}"
mkdir -p \
"${INSTALL_ROOT}"/usr/share/{man/man1,metainfo,web-greeter,xgreeters} \
"${INSTALL_ROOT}/etc/lightdm"
# Themes
(cp -R "${REPO_DIR}/themes" "${INSTALL_ROOT}/usr/share/web-greeter" \
&& cd "${INSTALL_ROOT}/usr/share/web-greeter" \
&& mv themes/_vendor .)
# Man Page
cp "${BUILD_DIR}/dist/${PKGNAME}.1" "${INSTALL_ROOT}/usr/share/man/man1"
# Greeter Config
cp "${BUILD_DIR}/dist/${PKGNAME}.yml" "${INSTALL_ROOT}/etc/lightdm"
# AppData File
cp "${BUILD_DIR}/dist/com.antergos.${PKGNAME}.appdata.xml" "${INSTALL_ROOT}/usr/share/metainfo"
# Desktop File
cp "${BUILD_DIR}/dist/com.antergos.${PKGNAME}.desktop" "${INSTALL_ROOT}/usr/share/xgreeters"
}
set_config() {
[[ -z "$1" || -z "$2" ]] && return 1
@ -142,6 +140,10 @@ case "$1" in
do_install_dev
;;
prepare-install)
prepare_install
;;
set-config)
set_config "$2" "$3"
;;

7
dist/com.antergos.web-greeter.appdata.xml vendored

@ -11,8 +11,8 @@
Web Greeter for LightDM utilizes themes built with HTML/CSS/JavaScript for it's login screen.
</p>
<p>
Web Greeter's themes provide modern, visually appealing, and feature-rich
login screens. It includes two themes by default. There are a growing number of
Web Greeter themes provide modern, visually appealing, and feature-rich
login screens. Two themes are included by default. There are a growing number of
3rd-Party themes available online.
</p>
</description>
@ -97,6 +97,9 @@
<suggests>
<id>apps.light-locker</id>
</suggests>
<provides>
<binary>web-greeter</binary>
</provides>
<update_contact>dustin_at_antergos.com</update_contact>
<translation type="gettext">web-greeter</translation>
<developer_name>Antergos Linux Project</developer_name>

6
themes/default/index.theme vendored

@ -1,6 +0,0 @@
[theme]
name=Antergos
description=Antergos Theme
engine=lightdm-webkit2-greeter
url=index.html
session=cinnamon
Loading…
Cancel
Save