Accepting request 304064 from home:oreinert
I want to maintain homeshick in Factory and would like to use utilities as the devel project. OBS-URL: https://build.opensuse.org/request/show/304064 OBS-URL: https://build.opensuse.org/package/show/utilities/homeshick?expand=0&rev=1
This commit is contained in:
commit
cc3dc74d98
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
50
README-openSUSE.md
Normal file
50
README-openSUSE.md
Normal file
@ -0,0 +1,50 @@
|
||||
# homeshick for openSUSE
|
||||
|
||||
## Target audience
|
||||
|
||||
This package contains a single shared installation of homeshick suitable for
|
||||
users. It provides the default `homeshick` command ready for use without
|
||||
configuration.
|
||||
|
||||
## Setup
|
||||
|
||||
To gain full functionality (the `homeshick cd` command), and maximum comfort of
|
||||
use (e.g., auto-completion), it is necessary for shell startup scrips to source
|
||||
a homeshick setup script. The normal installation instructions for homeshick
|
||||
explain how to do it:
|
||||
|
||||
[homeshick installation instructions](https://github.com/andsens/homeshick/wiki/Installation)
|
||||
|
||||
When following those instructions, any mention of cloning the homeshick git
|
||||
repository can be ignored, obviously. Also, the path
|
||||
`$HOME/.homesick/repos/homeshick` should be substituted with
|
||||
`/usr/share/homeshick` to access the corresponding files installed by this
|
||||
package.
|
||||
|
||||
For example, when the installation instructions tell you to run
|
||||
|
||||
```
|
||||
printf '\nsource "$HOME/.homesick/repos/homeshick/homeshick.sh"' >> $HOME/.bashrc
|
||||
```
|
||||
|
||||
you should instead run
|
||||
|
||||
```
|
||||
printf '\nsource "/usr/share/homeshick/homeshick.sh"' >> $HOME/.bashrc
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Hackers and developers
|
||||
|
||||
The default method of installing homeshick is for each user to make a private
|
||||
clone of the upstream repository from Github. For users that want to modify the
|
||||
implementation, and maybe make contributions to homeshick, that remains the way
|
||||
to go about it.
|
||||
|
||||
A git clone and this package can co-exist. Assuming that the setup scripts have
|
||||
been sourced, as instructed above, the environment variable `HOMESHICK_DIR` can
|
||||
be used to control which instance of homeshick is run, the default being the
|
||||
instance installed by this package.
|
||||
|
3
b5e7767367f0bdac85701e50272060bb9556760b.zip
Normal file
3
b5e7767367f0bdac85701e50272060bb9556760b.zip
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:75e2dbca14d5d08475c762b162f0bc68cd01a885d20473d88ad2739aaeb923e6
|
||||
size 50808
|
32
homeshick.changes
Normal file
32
homeshick.changes
Normal file
@ -0,0 +1,32 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 26 12:26:56 UTC 2015 - seroton10@gmail.com
|
||||
|
||||
- Added README for openSUSE.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 24 20:31:00 UTC 2015 - seroton10@gmail.com
|
||||
|
||||
- Make homeshick command available by default
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 19 12:51:55 UTC 2015 - seroton10@gmail.com
|
||||
|
||||
- PRs #135 and #138 accepted upstream, which allows running BATS
|
||||
tests in %check section without patches.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 13 11:16:39 UTC 2015 - seroton10@gmail.com
|
||||
|
||||
- Latest obs_compat fixes, spec-cleaning.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 11 22:41:51 UTC 2015 - seroton10@gmail.com
|
||||
|
||||
- First build with running BATS tests
|
||||
* Based on development branch for required fix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 9 17:01:13 UTC 2014 - seroton10@gmail.com
|
||||
|
||||
- Initial version
|
||||
|
64
homeshick.patch
Normal file
64
homeshick.patch
Normal file
@ -0,0 +1,64 @@
|
||||
diff --git a/bin/homeshick b/bin/homeshick
|
||||
index 46fd1da..b1e4a6f 100755
|
||||
--- a/bin/homeshick
|
||||
+++ b/bin/homeshick
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
repos="$HOME/.homesick/repos"
|
||||
# Include all helper functions. We will include the required command function later on.
|
||||
-homeshick=${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick}
|
||||
+homeshick=${HOMESHICK_DIR:-/usr/share/homeshick}
|
||||
source "$homeshick/lib/exit_status.sh"
|
||||
source "$homeshick/lib/fs.sh"
|
||||
source "$homeshick/lib/git.sh"
|
||||
diff --git a/bin/homeshick.csh b/bin/homeshick.csh
|
||||
index 2814f10..1c2c9a2 100644
|
||||
--- a/bin/homeshick.csh
|
||||
+++ b/bin/homeshick.csh
|
||||
@@ -1,6 +1,6 @@
|
||||
# This helper script should be sourced via an alias, e.g.
|
||||
#
|
||||
-# alias homeshick "source $HOME/.homesick/repos/homeshick/bin/homeshick.csh"
|
||||
+# alias homeshick "source /usr/share/homeshick/bin/homeshick.csh"
|
||||
#
|
||||
if ( "$1" == "cd" && "x$2" != "x" ) then
|
||||
if ( -d "$HOME/.homesick/repos/$2/home" ) then
|
||||
@@ -12,6 +12,6 @@ else
|
||||
if ( $?HOMESHICK_DIR ) then
|
||||
$HOMESHICK_DIR/bin/homeshick $*
|
||||
else
|
||||
- $HOME/.homesick/repos/homeshick/bin/homeshick $*
|
||||
+ /usr/share/homeshick/bin/homeshick $*
|
||||
endif
|
||||
endif
|
||||
diff --git a/homeshick.fish b/homeshick.fish
|
||||
index 10359ee..51cd0a2 100644
|
||||
--- a/homeshick.fish
|
||||
+++ b/homeshick.fish
|
||||
@@ -1,5 +1,5 @@
|
||||
# This script should be sourced in the context of your shell like so:
|
||||
-# source $HOME/.homesick/repos/homeshick/homeshick.fish
|
||||
+# source /usr/share/homeshick/homeshick.fish
|
||||
# Once the homeshick() function is defined, you can type
|
||||
# "homeshick cd CASTLE" to enter a castle.
|
||||
|
||||
@@ -9,6 +9,6 @@ function homeshick
|
||||
else if set -q HOMESHICK_DIR
|
||||
eval $HOMESHICK_DIR/bin/homeshick $argv
|
||||
else
|
||||
- eval $HOME/.homesick/repos/homeshick/bin/homeshick $argv
|
||||
+ eval /usr/share/homeshick/bin/homeshick $argv
|
||||
end
|
||||
end
|
||||
diff --git a/homeshick.sh b/homeshick.sh
|
||||
index e8c2663..797731d 100644
|
||||
--- a/homeshick.sh
|
||||
+++ b/homeshick.sh
|
||||
@@ -7,6 +7,6 @@ function homeshick() {
|
||||
if [ "$1" = "cd" ] && [ -n "$2" ]; then
|
||||
cd "$HOME/.homesick/repos/$2"
|
||||
else
|
||||
- "${HOMESHICK_DIR:-$HOME/.homesick/repos/homeshick}/bin/homeshick" "$@"
|
||||
+ "${HOMESHICK_DIR:-/usr/share/homeshick}/bin/homeshick" "$@"
|
||||
fi
|
||||
}
|
2
homeshick.rpmlintrc
Normal file
2
homeshick.rpmlintrc
Normal file
@ -0,0 +1,2 @@
|
||||
addFilter("non-executable-script .*/usr/share/homeshick/lib")
|
||||
|
92
homeshick.spec
Normal file
92
homeshick.spec
Normal file
@ -0,0 +1,92 @@
|
||||
#
|
||||
# spec file for package homeshick
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define git_sha1 b5e7767367f0bdac85701e50272060bb9556760b
|
||||
Name: homeshick
|
||||
# NB: The upstream project does not have any releases; hence, this package will
|
||||
# remain at version zero. The precise package content is identified by the git
|
||||
# hash above. Package updates are only indicated by the RPM release number,
|
||||
# which is incremented by OBS for each package change.
|
||||
Version: 0
|
||||
Release: 0
|
||||
Summary: Dotfile synchronizer based on Git and Bash
|
||||
License: MIT
|
||||
Group: Productivity/File utilities
|
||||
Url: https://github.com/andsens/homeshick
|
||||
Source0: https://github.com/andsens/homeshick/archive/%{git_sha1}.zip
|
||||
Source1: README-openSUSE.md
|
||||
Patch0: homeshick.patch
|
||||
BuildRequires: expect
|
||||
BuildRequires: git >= 1.5
|
||||
BuildRequires: iputils
|
||||
BuildRequires: tcsh
|
||||
BuildRequires: unzip
|
||||
Requires: bash >= 3
|
||||
Requires: git >= 1.5
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
%if 0%{?suse_version} && 0%{?suse_version} > 1320
|
||||
BuildRequires: bats
|
||||
BuildRequires: fish
|
||||
%endif
|
||||
|
||||
%description
|
||||
In Unix, configuration files are king. Tailoring tools to suit your needs
|
||||
through configuration can be empowering. An immense number of hours is spent
|
||||
on getting these adjustments just right, but once you leave the confines of
|
||||
your own computer, these local optimizations are left behind.
|
||||
|
||||
By the power of git, homeshick enables you to bring the symphony of settings
|
||||
you have poured your heart into with you to remote computers. With it you can
|
||||
begin to focus even more energy on bettering your work environment since the
|
||||
benefits are reaped on whichever machine you are using.
|
||||
|
||||
However bare bones these machines are, provided that at least bash 3 and git
|
||||
1.5 are available you can use homeshick. homeshick can handle multiple dotfile
|
||||
repositories. This means that you can install larger frameworks like oh-my-zsh
|
||||
or a multitude of emacs or vim plugins alongside your own customizations
|
||||
without clutter.
|
||||
|
||||
Packaged revision: %{git_sha1}
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{git_sha1}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_datadir}/%{name}
|
||||
mv %{name}.sh %{name}.fish bin lib completions %{buildroot}%{_datadir}/%{name}
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
ln -s %{_datadir}/%{name}/bin/homeshick %{buildroot}%{_bindir}/%{name}
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%check
|
||||
# only run tests if bats is available
|
||||
if type bats &>/dev/null; then
|
||||
HOMESHICK_DIR=%{buildroot}%{_datadir}/%{name} bats test/suites
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README.md README-openSUSE.md LICENSE CONTRIBUTING.md
|
||||
%{_datadir}/%{name}
|
||||
%{_bindir}/homeshick
|
||||
|
||||
%changelog
|
Loading…
x
Reference in New Issue
Block a user