diff --git a/README.md b/README.md index 23a06f7..3fc5cef 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) [![Coverage Status](https://coveralls.io/repos/github/deadc0de6/dotdrop/badge.svg?branch=master)](https://coveralls.io/github/deadc0de6/dotdrop?branch=master) [![PyPI version](https://badge.fury.io/py/dotdrop.svg)](https://badge.fury.io/py/dotdrop) +[![AUR](https://img.shields.io/aur/version/dotdrop.svg)](https://aur.archlinux.org/packages/dotdrop) [![Python](https://img.shields.io/pypi/pyversions/dotdrop.svg)](https://pypi.python.org/pypi/dotdrop) *Save your dotfiles once, deploy them everywhere* @@ -30,6 +31,7 @@ Features: * Easy import dotfiles * Handle files and directories * Associate an action to the deployment of specific dotfiles +* Associate transformations that allow to store encrypted dotfiles Check the [blog post](https://deadc0de.re/articles/dotfiles.html) and and the [example](#example) for more. @@ -85,7 +87,9 @@ to your dotfiles git tree or system-wide [with pypi](#with-pypi). Having dotdrop as a submodule guarantees that anywhere your are cloning your dotfiles git tree from you'll have dotdrop shipped with it. It is the recommended way. -Dotdrop is also available on aur: https://aur.archlinux.org/packages/dotdrop/ +Dotdrop is also available on aur: +* stable: https://aur.archlinux.org/packages/dotdrop/ +* git version: https://aur.archlinux.org/packages/dotdrop-git/ ## As a submodule diff --git a/packages/arch-dotdrop-git/PKGBUILD b/packages/arch-dotdrop-git/PKGBUILD new file mode 100644 index 0000000..67ecb31 --- /dev/null +++ b/packages/arch-dotdrop-git/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: deadc0de6 + +_pkgname=dotdrop +pkgname="${_pkgname}-git" +pkgver=0.10.r10.gafe0c71 +pkgrel=1 +pkgdesc="Save your dotfiles once, deploy them everywhere " +arch=('any') +url="https://github.com/deadc0de6/dotdrop" +license=('GPL') +groups=() +depends=('python' 'python-setuptools' 'python-jinja' 'python-docopt' 'python-pyaml') +makedepends=('git') +provides=(dotdrop) +conflicts=(dotdrop) +source=("git+https://github.com/deadc0de6/dotdrop.git") +md5sums=('SKIP') + +pkgver() { + cd "${_pkgname}" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g' +} + +package() { + cd "${_pkgname}" + python setup.py install --root="${pkgdir}/" --optimize=1 +} + diff --git a/packages/arch-dotdrop/PKGBUILD b/packages/arch-dotdrop/PKGBUILD new file mode 100644 index 0000000..545ceac --- /dev/null +++ b/packages/arch-dotdrop/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: deadc0de6 + +pkgname=dotdrop +pkgver= +pkgrel=1 +pkgdesc="Save your dotfiles once, deploy them everywhere " +arch=('any') +url="https://github.com/deadc0de6/dotdrop" +license=('GPL') +groups=() +depends=('python' 'python-setuptools' 'python-jinja' 'python-docopt' 'python-pyaml') +makedepends=('git') +source=("git+https://github.com/deadc0de6/dotdrop.git#tag=v${pkgver}") +md5sums=('SKIP') + +pkgver() { + cd "${pkgname}" + git describe --abbrev=0 --tags | sed 's/^v//g' +} + +package() { + cd "${pkgname}" + python setup.py install --root="${pkgdir}/" --optimize=1 +} + diff --git a/packages/arch/.SRCINFO b/packages/arch/.SRCINFO deleted file mode 100644 index 2e695b3..0000000 --- a/packages/arch/.SRCINFO +++ /dev/null @@ -1,16 +0,0 @@ -pkgbase = dotdrop - pkgdesc = Save your dotfiles once, deploy them everywhere - pkgver = 0.10 - pkgrel = 1 - url = https://github.com/deadc0de6/dotdrop - arch = any - license = GPL - depends = python - depends = python-jinja - depends = python-docopt - depends = python-pyaml - source = git+https://github.com/deadc0de6/dotdrop.git - md5sums = SKIP - -pkgname = dotdrop - diff --git a/packages/arch/PKGBUILD b/packages/arch/PKGBUILD deleted file mode 100644 index 87281d7..0000000 --- a/packages/arch/PKGBUILD +++ /dev/null @@ -1,24 +0,0 @@ -# Maintainer: deadc0de6 - -pkgname=dotdrop -pkgver=0.10 -pkgrel=1 -pkgdesc="Save your dotfiles once, deploy them everywhere " -arch=('any') -url="https://github.com/deadc0de6/dotdrop" -license=('GPL') -groups=() -depends=('python' 'python-jinja' 'python-docopt' 'python-pyaml') -source=("git+https://github.com/deadc0de6/dotdrop.git") -md5sums=('SKIP') - -pkgver() { - cd "$pkgname" - git tag -l | tail -1 | sed 's/^v//g' -} - -package() { - cd "${pkgname}" - python setup.py install --root="${pkgdir}/" -} - diff --git a/packages/genpkg.sh b/packages/genpkg.sh new file mode 100755 index 0000000..3ae98f2 --- /dev/null +++ b/packages/genpkg.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# author: deadc0de6 +# +# update packages +# + +# $1: version +up() +{ + # update pkgver + [ "${1}" != "" ] && sed -i "s/^pkgver=.*$/pkgver=${1}/g" ${pkgfile} + # create srcinfo + rm -f .SRCINFO + makepkg --printsrcinfo > .SRCINFO +} + +# pivot +cur=$(dirname "$(readlink -f "${0}")") +opwd=`pwd` +pkgfile="PKGBUILD" +cd ${cur} + +######################## +# update arch package +# tag release +######################## +dir="arch-dotdrop" +echo "doing ${dir} ..." +cd ${dir} +version="`git describe --abbrev=0 --tags | sed 's/^v//g'`" +up ${version} +cd ${OLDPWD} + +######################## +# update arch package +# git release +######################## +dir="arch-dotdrop-git" +echo "doing ${dir} ..." +cd ${dir} +# replace pkgver +#version="`git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'`" +up +cd ${OLDPWD} + +# pivot back +cd ${opwd}