Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian packaging #169

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9f551b7
First pass at a debian package
regularfry Jul 1, 2013
e30f98d
Fix debian/rules to only run make install_files
regularfry Jul 1, 2013
f2dbc9d
Update .gigignore to ignore debian packaging artifacts
regularfry Jul 1, 2013
4f2a2c0
Restore the full `make install` task
bmalex Jul 6, 2013
9af4923
Version bump to 0.4.0.
postmodern Jan 15, 2013
c77b750
Also export RUBY_PATCHLEVEL (issue #62).
postmodern Jan 15, 2013
ec13525
updated formatting and env descriptions
havenwood Jan 15, 2013
63dae6a
Renamed chruby.md to chruby.1.md.
postmodern Jan 15, 2013
09c6c3e
Moved docs/chruby.1 into share/man/man1/
postmodern Jan 15, 2013
2c53469
Added a basic man page task.
postmodern Jan 15, 2013
4f5e5ac
added -v, --version to OPTIONS
havenwood Feb 12, 2013
189861d
Added chruby-exec(1) manpage to See Also section.
havenwood Mar 31, 2013
c284f63
remove doc/ from .gitignore
havenwood Mar 31, 2013
b30d23e
initial commit
havenwood Mar 31, 2013
fccdd41
initial commit
havenwood Mar 31, 2013
fbfb1ae
Added chruby-exec(1) duplicates of chruby(1) entries.
havenwood Mar 31, 2013
cf35adb
Use kramdown-man (https://github.com/postmodern/kramdown-man).
postmodern May 7, 2013
23c18ec
Correct spelling typo.
havenwood Jun 15, 2013
1adcb8a
Correct spelling typo.
havenwood Jun 15, 2013
3e10495
Implement chruby-install as a function.
havenwood Jul 22, 2013
8255155
Merge remote-tracking branch 'havenwood/chruby-install' into 0.4.0
postmodern Jul 22, 2013
505a421
Simply call chruby --version to avoid redefining CHRUBY_VERSION.
postmodern Jul 22, 2013
4ad9316
Use `type -t` to detect ruby-install.
postmodern Jul 22, 2013
9b9535a
Prefix error messages with the function name.
postmodern Jul 22, 2013
ea4cf1a
Print to stderr.
postmodern Jul 22, 2013
30b401e
Style.
postmodern Jul 22, 2013
3bd58f9
If ruby-install is available, also print it's version.
postmodern Jul 22, 2013
8404386
Create a chruby-install manpage.
havenwood Jul 22, 2013
c1eece3
Fixed a typo.
postmodern Jul 22, 2013
ded83ff
Began adding tests.
postmodern Jul 22, 2013
b07cc80
Add chruby-install usage instructions.
havenwood Jul 22, 2013
1c92f23
Wording.
postmodern Jul 22, 2013
085f029
Use `command -v` for zsh compatibility.
havenwood Jul 22, 2013
bf3aee5
Merge with 0.4.0
regularfry Aug 18, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
doc/
pkg/*.tar.gz
pkg/*.tar.bz2
pkg/*.zip
test/rubies
debian/chruby*
debian/files
26 changes: 20 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME=chruby
VERSION=0.3.7
VERSION=0.4.0
AUTHOR=postmodern
URL=https://github.com/$(AUTHOR)/$(NAME)

Expand All @@ -13,12 +13,26 @@ PKG_NAME=$(NAME)-$(VERSION)
PKG=$(PKG_DIR)/$(PKG_NAME).tar.gz
SIG=$(PKG).asc

DESTDIR?=/
PREFIX?=/usr/local
DOC_DIR=$(PREFIX)/share/doc/$(PKG_NAME)
INSTALL_PATH=$(DESTDIR)/$(PREFIX)
DOC_DIR?=$(INSTALL_PATH)/share/doc/$(NAME)

pkg:
mkdir $(PKG_DIR)

share/man/man1/chruby.1: doc/man/chruby.1.md
kramdown-man <doc/man/chruby.1.md >share/man/man1/chruby.1

share/man/man1/chruby-exec.1: doc/man/chruby-exec.1.md
kramdown-man <doc/man/chruby-exec.1.md >share/man/man1/chruby-exec.1

man: share/man/man1/chruby.1
git commit -m "Updated the man pages" doc/man/chruby.1.md share/man/man1/chruby.1

man: share/man/man1/chruby-exec.1
git commit -m "Updated the man pages" doc/man/chruby-exec.1.md share/man/man1/chruby-exec.1

download: pkg
wget -O $(PKG) $(URL)/archive/v$(VERSION).tar.gz

Expand Down Expand Up @@ -54,13 +68,13 @@ tag:
release: tag download sign

install:
for dir in $(INSTALL_DIRS); do mkdir -p $(PREFIX)/$$dir; done
for file in $(INSTALL_FILES); do cp $$file $(PREFIX)/$$file; done
for dir in $(INSTALL_DIRS); do mkdir -p $(INSTALL_PATH)/$$dir; done
for file in $(INSTALL_FILES); do cp $$file $(INSTALL_PATH)/$$file; done
mkdir -p $(DOC_DIR)
cp -r $(DOC_FILES) $(DOC_DIR)/

uninstall:
for file in $(INSTALL_FILES); do rm -f $(PREFIX)/$$file; done
for file in $(INSTALL_FILES); do rm -f $(INSTALL_PATH)/$$file; done
rm -rf $(DOC_DIR)

.PHONY: build download sign verify clean test tag release install uninstall all
.PHONY: build man download sign verify clean test tag release install uninstall all
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,32 @@ Chruby provides detailed instructions for installing additional Rubies:
* [Rubinius](https://github.com/postmodern/chruby/wiki/Rubinius)
* [MagLev](https://github.com/postmodern/chruby/wiki/MagLev)

#### chruby-install

If you'd like to use chruby-install to install Rubies, just install
[ruby-install] and add the following after where you have loaded `chruby.sh`:

source /usr/local/share/chruby/install.sh

You can then use chruby-install to install additional Rubies, making them
immediately available to chruby.

List Rubies for installation:

chruby-install

Install the current stable version of a Ruby:

chruby-install ruby

Install the latest version of a Ruby:

chruby-install ruby 1.9

Install a Ruby with specific configuration:

chruby-install ruby 2.0.0-p0 -- --enable-shared --enable-dtrace CFLAGS="-O3"

#### ruby-install

You can also use [ruby-install] to install additional Rubies:
Expand Down
12 changes: 12 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
chruby (0.4.0) unstable; urgency=low

* Package upstream version 0.4.0

-- Alex Young <[email protected]> Sun, 18 Aug 2013 13:44:36 +0100


chruby (0.3.6) unstable; urgency=low

* Initial package

-- Alex Young <[email protected]> Mon, 01 Jul 2013 10:20:24 +0100
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
14 changes: 14 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Source: chruby
Section: devel
Priority: extra
Maintainer: Alex Young <[email protected]>
Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.3
Homepage: https://github.com/postmodern/chruby#readme

Package: chruby
Architecture: all
Depends: ${misc:Depends}
Description: Changes the current Ruby.
Updates $PATH, $GEM_HOME and $GEM_PATH to use rubies installed under
/opt/rubies or $HOME/.rubies.
24 changes: 24 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: chruby
Source: https://github.com/postmodern/chruby

Files: *
Copyright: 2012-2013 Hal Brodigan <[email protected]>
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4 changes: 4 additions & 0 deletions debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
LICENSE.txt
README.md
ChangeLog.md
CONTRIBUTING.md
17 changes: 17 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

override_dh_auto_test-indep:

override_dh_auto_build-indep:

%:
PREFIX=/usr dh $@
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
76 changes: 76 additions & 0 deletions doc/man/chruby-exec.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# chruby-exec(1) -- Run a command with selected Ruby.

## SYNOPSIS

`chruby-exec` RUBY [RUBYOPTS] -- COMMAND

## ARGUMENTS

*RUBY*
Change current Ruby based on fuzzy matching of Ruby by name.

*RUBYOPTS*
Additional optional arguments to pass to Ruby.

*COMMAND*
Command to run under the selected Ruby.

## OPTIONS

`-h`, `--help`

`-v`, `--version`

## DESCRIPTION
Run a command with the selected Ruby version by correctly setting the appropriate environment variables.

[https://github.com/postmodern/chruby/blob/master/README.md](https://github.com/postmodern/chruby/blob/master/README.md)

## EXAMPLES

Run the command `gem update` under JRuby:
$ chruby-exec jruby -- gem update

##FILES

*/opt/rubies*
Primary default Ruby install location.

*~/.rubies/*
Secondary default Ruby install location.

*/etc/profile.d/chruby.sh*
Application environment settings for chruby.

*~/.gem/$ruby/$version*
Default gem install location.

##ENVIRONMENT

*PATH*
Updates the PATH environment variable to include Rubies and RubyGems bin/ directories.

*GEM_HOME*
Default repository location for gem installation.

*GEM_PATH*
A colon-separated list of gem repository directories.

*GEM_ROOT*

*RUBY_ROOT*

*RUBY_ENGINE*
Name of Ruby implementation.

*RUBY_VERSION*
Ruby version number.

*RUBYOPT*
Optionally set if additional Ruby options are given.

##AUTHOR
Postmodern [postmodern.mod3\@gmail.com](mailto:postmodern.mod3\@gmail.com).

##SEE ALSO
chruby(1), ruby(1), gem(1)
76 changes: 76 additions & 0 deletions doc/man/chruby-install.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# chruby-install(1) -- Install the selected Ruby with ruby-install.

## SYNOPSIS

`chruby-install` [OPTIONS] [RUBY [VERSION]] [-- CONFIGURE_OPTS ...]

## ARGUMENTS

*RUBY*
Install Ruby by name.

*VERSION*
Optionally select Ruby version.

*CONFIGURE_OPTS*
Additional optional configure arguments.

## OPTIONS

`-h`, `--help`

`-V`, `--version`

See `man ruby-install` for Ruby installation options.

## DESCRIPTION
Installs Ruby, JRuby, Rubinius or MagLev with ruby-install.

[https://github.com/postmodern/ruby-install#readme](https://github.com/postmodern/ruby-install#readme)

And then reloads chruby Rubies.

[https://github.com/postmodern/chruby/blob/master/README.md](https://github.com/postmodern/chruby/blob/master/README.md)

## ARGUMENTS

*RUBY*
Install Ruby by name.

*VERSION*
Optionally select the version of selected Ruby.

*CONFIGURE_OPTS*
Additional optional configure arguments.

## EXAMPLES

Install the current stable version of Ruby:

$ chruby-install ruby

Install a specific version of Ruby:

$ chruby-install ruby 1.9.3-p395

## FILES

*/usr/local/src*
Default root user source directory.

*~/src*
Default non-root user source directory.

*/opt/rubies/$ruby-$version*
Default root user installation directory.

*~/.rubies/$ruby-$version*
Default non-root user installation directory.

## AUTHOR

Postmodern <[email protected]>

## SEE ALSO

ruby-install(1), chruby(1), chruby-exec(1), ruby(1), gem(1)
Loading