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

58
build/utils.sh

@ -10,8 +10,8 @@ DESTDIR=''
_handle_error() { _handle_error() {
LASTLINE="$1" LASTLINE="$1"
LASTERR="$2" LASTERR="$2"
echo "${BASH_SOURCE[0]}: line ${LASTLINE}: exit status of last command: ${LASTERR}" (>&2 echo "${BASH_SOURCE[0]}: line ${LASTLINE}: exit status of last command: ${LASTERR}")
exit 1 exit "${LASTERR}"
} }
clean_build_dir() { clean_build_dir() {
@ -45,34 +45,8 @@ do_build() {
} }
do_install() { 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}" [[ -e "${DESTDIR}" ]] || mkdir -p "${DESTDIR}"
cp -R "${INSTALL_ROOT}"/* "${DESTDIR}" cp -R "${INSTALL_ROOT}"/* "${DESTDIR}"
# Fix Permissions
[[ -n "${SUDO_UID}" ]] && chown -R "${SUDO_UID}:${SUDO_GID}" "${BUILD_DIR}"
} }
do_install_dev() { do_install_dev() {
@ -97,6 +71,30 @@ init_build_dir() {
cp -R -t "${BUILD_DIR}" "${REPO_DIR}/web-greeter" "${REPO_DIR}/dist" 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() { set_config() {
[[ -z "$1" || -z "$2" ]] && return 1 [[ -z "$1" || -z "$2" ]] && return 1
@ -142,6 +140,10 @@ case "$1" in
do_install_dev do_install_dev
;; ;;
prepare-install)
prepare_install
;;
set-config) set-config)
set_config "$2" "$3" 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. Web Greeter for LightDM utilizes themes built with HTML/CSS/JavaScript for it's login screen.
</p> </p>
<p> <p>
Web Greeter's themes provide modern, visually appealing, and feature-rich Web Greeter themes provide modern, visually appealing, and feature-rich
login screens. It includes two themes by default. There are a growing number of login screens. Two themes are included by default. There are a growing number of
3rd-Party themes available online. 3rd-Party themes available online.
</p> </p>
</description> </description>
@ -97,6 +97,9 @@
<suggests> <suggests>
<id>apps.light-locker</id> <id>apps.light-locker</id>
</suggests> </suggests>
<provides>
<binary>web-greeter</binary>
</provides>
<update_contact>dustin_at_antergos.com</update_contact> <update_contact>dustin_at_antergos.com</update_contact>
<translation type="gettext">web-greeter</translation> <translation type="gettext">web-greeter</translation>
<developer_name>Antergos Linux Project</developer_name> <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