diff --git a/PKGBUILD b/PKGBUILD index d867e481..336730dc 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,9 +1,7 @@ # Maintainer: Ulises Jeremias Cornejo Fandos -# Maintainer: Federico Ramon Gasquez -# Maintainer: Maria Macarena Lindo Poisson pkgname=dots-stable -pkgver=1.0.0 +pkgver=1.2.2 pkgrel=1 pkgdesc="Dotfiles generator that allows quick configuration and managing of different tools and window managers in multiple OSs" arch=(any) @@ -17,18 +15,17 @@ source=("git+$url.git") md5sums=('SKIP') pkgver() { - cd dotfiles || exit 1 - git fetch --tags + cd dotfiles git describe --tags "$(git rev-list --tags --max-count=1)" | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } package() { - cd dotfiles || exit 1 + cd dotfiles git fetch --tags latest_release=$(git describe --tags "$(git rev-list --tags --max-count=1)") git checkout "${latest_release}" PKGNAME=dots - DESTDIR="${pkgdir}" - export DESTDIR PKGNAME + PKGDIR="${pkgdir}" + export PKGDIR PKGNAME ./install } diff --git a/PKGBUILD.dev b/PKGBUILD.dev index 7b23563e..0c3271b7 100644 --- a/PKGBUILD.dev +++ b/PKGBUILD.dev @@ -1,9 +1,7 @@ # Maintainer: Ulises Jeremias Cornejo Fandos -# Maintainer: Federico Ramon Gasquez -# Maintainer: Maria Macarena Lindo Poisson pkgname=dots-git -pkgver=1.0.0.r11.ge8b9cfc +pkgver=1.2.2 pkgrel=1 pkgdesc="Dotfiles generator that allows quick configuration and managing of different tools and window managers in multiple OSs" arch=(any) @@ -17,15 +15,14 @@ source=("git+$url.git") md5sums=('SKIP') pkgver() { - cd dotfiles || exit 1 - git fetch --tags + cd dotfiles git describe --tags "$(git rev-list --tags --max-count=1)" | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } package() { - cd dotfiles || exit 1 + cd dotfiles PKGNAME=dots - DESTDIR="${pkgdir}" - export DESTDIR PKGNAME + PKGDIR="${pkgdir}" + export PKGDIR PKGNAME ./install } diff --git a/install b/install index e4655717..f002b2b8 100755 --- a/install +++ b/install @@ -7,28 +7,28 @@ PKGNAME=${PKGNAME:-"dots"} # creates variable `os` . "${ROOT}"/util/os.sh -rm -rf "${DESTDIR}/opt/${PKGNAME}" \ - "${DESTDIR}/usr/bin/dots" \ - "${DESTDIR}/usr/share/licenses/${PKGNAME}/" \ - "${DESTDIR}/usr/share/doc/${PKGNAME}/" +rm -rf "${PKGDIR}/opt/${PKGNAME}" \ + "${PKGDIR}/usr/bin/dots" \ + "${PKGDIR}/usr/share/licenses/${PKGNAME}/" \ + "${PKGDIR}/usr/share/doc/${PKGNAME}/" -install -d "${DESTDIR}/opt/${PKGNAME}" +install -d "${PKGDIR}/opt/${PKGNAME}" for dirname in common "${os}" ui util; do - cp -Rf "${ROOT}"/"${dirname}" "${DESTDIR}/opt/${PKGNAME}" + cp -Rf "${ROOT}"/"${dirname}" "${PKGDIR}/opt/${PKGNAME}" done -install -Dm644 "${ROOT}"/LICENSE -t "${DESTDIR}/usr/share/licenses/${PKGNAME}/" -install -Dm644 "${ROOT}"/README.md -t "${DESTDIR}/usr/share/doc/${PKGNAME}/" -install -Dm755 "${ROOT}"/dots -t "${DESTDIR}/opt/${PKGNAME}/" +install -Dm644 "${ROOT}"/LICENSE -t "${PKGDIR}/usr/share/licenses/${PKGNAME}/" +install -Dm644 "${ROOT}"/README.md -t "${PKGDIR}/usr/share/doc/${PKGNAME}/" +install -Dm755 "${ROOT}"/dots -t "${PKGDIR}/opt/${PKGNAME}/" -mkdir -p "${DESTDIR}"/usr/bin +mkdir -p "${PKGDIR}"/usr/bin -# Create dots binary at ${DESTDIR}/usr/bin/${PKGNAME} to wrap the file at ${DESTDIR}/opt/${PKGNAME}/dots -cat > "${DESTDIR}"/usr/bin/"${PKGNAME}" < "${PKGDIR}"/usr/bin/"${PKGNAME}" <