Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
update Makefile (for real this time). few other small changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
lots0logs committed Feb 12, 2017
1 parent e0b775d commit 6899920
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 43 deletions.
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/make -f

DO := ./build/utils.sh
SET_CONFIG := $(DO) set-config
DESTDIR ?= /
MAYBE_SUDO := ''
DO := ./build/utils.sh
SET_CONFIG := $(DO) set-config
DESTDIR ?= /
MAYBE_SUDO_DO := $(DO)

define colorecho
@tput setaf 118 || true
Expand All @@ -18,7 +18,7 @@ stays_on_top := False
endif

ifeq ($(DESTDIR),/)
MAYBE_SUDO := sudo
MAYBE_SUDO_DO := sudo $(DO)
endif


Expand Down Expand Up @@ -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!)


Expand Down
58 changes: 30 additions & 28 deletions build/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand All @@ -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

Expand Down Expand Up @@ -142,6 +140,10 @@ case "$1" in
do_install_dev
;;

prepare-install)
prepare_install
;;

set-config)
set_config "$2" "$3"
;;
Expand Down
7 changes: 5 additions & 2 deletions dist/com.antergos.web-greeter.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 0 additions & 6 deletions themes/default/index.theme

This file was deleted.

0 comments on commit 6899920

Please sign in to comment.