Skip to content
Snippets Groups Projects
Commit 9dea3970 authored by Antonio Terceiro's avatar Antonio Terceiro
Browse files

Improve docs, install as manpage

parent 5a624208
No related branches found
No related tags found
No related merge requests found
......@@ -7,3 +7,4 @@
/ruby
/testrb
/ruby-standalone
*.1.gz
# INSTALLATION
From the Debian repository:
apt-get install ruby-standlone
From sources:
```
$ make
$ make install
```
......@@ -10,12 +10,17 @@ endif
BINSTUBS := $(shell dpkg -L ruby | grep /usr/bin/ | xargs -n 1 basename)
BINSTUBS := $(subst ruby,,$(BINSTUBS))
BINARIES = ruby $(BINSTUBS)
MANPAGES = ruby-standalone.1.gz
include buildflags.mk
CFLAGS += -std=c11 -Wall
all: $(BINARIES) ruby-standalone
all: $(BINARIES) ruby-standalone $(MANPAGES)
$(MANPAGES): %.1.gz: %.1
$(RM) $@
gzip $<
buildflags.mk:
dpkg-buildflags --export=make > $@
......@@ -28,16 +33,28 @@ ruby-standalone: ruby-standalone.in
sed -e 's#@@prefix@@#$(PREFIX)#g' $< > $@ || ($(RM) $@; false)
chmod +x $@
ruby-standalone.1: README.md
pandoc --standalone --to man \
-V title:ruby-standalone \
-V section:1 \
-V footer:ruby-standalone \
-V header:'User commands' \
-V date:"$(shell LANG=C date -d "$(dpkg-parsechangelog -SDate)" '+%B %Y')" \
-o $@ $<
sed -i -e '2 s/\.SH\s*/\.SH NAME\n/' $@
install: all
install -d $(DESTDIR)$(PREFIX)/bin
install -d $(DESTDIR)$(RUBYLIB)
install -d $(DESTDIR)$(BINDIR)
install -d $(DESTDIR)$(PREFIX)/man/man1
install -m 0755 $(BINARIES) $(DESTDIR)$(PREFIX)/bin
install -m 0755 ruby-standalone $(DESTDIR)$(BINDIR)
install -m 0644 debian_ruby_standalone.rb $(DESTDIR)$(RUBYLIB)
install -m 0644 $(MANPAGES) $(DESTDIR)/man/man1
distclean clean:
$(RM) $(BINARIES) ruby-standalone buildflags.mk
$(RM) $(BINARIES) $(MANPAGES) ruby-standalone buildflags.mk *.1
test: all
if [ -x /usr/bin/ruby -a -x /usr/bin/shunit2 ]; then ./run-tests; fi
# ruby-standlone: use (only) the Ruby interpreter from Debian
# ruby-standlone - use (only) the Ruby interpreter from Debian
# USAGE
**ruby-standalone** [_PROGRAM_] [_ARGS_]
# DESCRIPTION
ruby-standlone allows one to use the Ruby interpreter provided by Debian (and
thus get security support for stable releases), without having to also use Ruby
libraries and applications from Debian.
## Use cases
When called with no arguments, `ruby-standalone` will spawn a new shell, where
all of the standard Ruby programs (ruby, erb, gem, irb, rdoc, ri, testrb) will
never use code from Debian-provided packages.
Otherwise, _PROGRAM_ will be called with _ARGS_ as arguments, in that same
context.
**Caveat:** if _PROGRAM_ is not installed as a Rubygem and is installed by a
Debian package, the Debian package version _will_ be used.
# USE CASES
ruby-standalone makes it possible to:
......@@ -19,31 +35,7 @@ ruby-standalone makes it possible to:
in-house Rails application that needs a different version of Rails than the
one Debian provides.
## Installation
From Debian:
$ sudo apt-get install ruby-standalone
From source:
$ make
$ sudo make install
## Usage
You just have to make sure that the binaries provided by ruby-standalone are in
your `$PATH`.
When installing from Debian, a debconf prompt will ask whether you want to
install the programs in `/usr/local/bin`. If don't want that, you can still add
`/usr/lib/ruby-standalone/bin` to the `$PATH`, or symlink the binaries there to
another directory that is already in your `$PATH`.
If you are installing from source, the binaries will already be installed to
`/usr/local/bin`.
## License
# LICENSE
Copyright © 2014, Antonio Terceiro <terceiro@debian.org>
......
README.md
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment