Added gemspec & makefile.

This commit is contained in:
Glenn Y. Rolland 2010-11-09 12:26:41 +01:00
parent b925441852
commit 882e410c6f
2 changed files with 95 additions and 0 deletions

59
Makefile Normal file
View file

@ -0,0 +1,59 @@
DESTDIR=
NAME=xtm-utils
GEMNAME=xtm-utils
RUBYVERSION=1.8
BINDIR=$(DESTDIR)/usr/bin
MANDIR=$(DESTDIR)/usr/share/man
LIBDIR=$(DESTDIR)/usr/lib/ruby/$(RUBYVERSION)
DOCDIR=$(DESTDIR)/usr/share/doc/$(NAME)
RDOC=rdoc$(RUBYVERSION)
#RDOC=rdoc1.9
all: doc test
clean:
rm -fr doc *.gem
build:
.PHONY: doc doc-reader
doc-reader: doc
xdg-open file://`pwd`/doc/api/index.html
doc:
rm -fr doc/api
$(RDOC) \
--promiscuous \
--inline-source \
--line-numbers \
-o doc/api lib/
# --diagram
.PHONY: test
test:
$(MAKE) -C test
install: doc test
# install libraries
#
find lib -name '*.rb' |while read FILE ; do \
FILEPATH=`echo $$FILE |sed -e "s~^lib~$(LIBDIR)~"` ; \
install -D -o root -g root -m 644 $$FILE $$FILEPATH ; \
done
# install binaries
find bin -name '*.rb' |while read FILE ; do \
FILEPATH=`echo $$FILE |sed -e "s~^bin~$(BINDIR)~"` ; \
install -D -o root -g root -m 755 $$FILE $$FILEPATH ; \
done
# install documentation
rm -fr $(DOCDIR)
mkdir -p $(DOCDIR)
cp -a doc $(DOCDIR)
gem:
gem build $(GEMNAME).gemspec
gem_install:
gem install $(GEMNAME)*.gem

36
xtm-utils.gemspec Normal file
View file

@ -0,0 +1,36 @@
#!/usr/bin/ruby -d
require 'rake'
spec = Gem::Specification.new do |s|
s.author = 'Glenn Y. Rolland'
s.email = 'glenux@glenux.net'
s.homepage = 'http://glenux.github.com/xtm-utils/'
s.signing_key = ENV['GEM_PRIVATE_KEY']
s.cert_chain = ENV['GEM_CERTIFICATE_CHAIN']
s.name = 'xtm-utils'
s.version = '0.1'
s.summary = 'A set of tools for joining or splitting files using the XTM format.'
s.description = ' xtm-utils is a set of tools for joining or splitting files using the XTM format .' \
'It is an open-source replacement for the the closed-source binary provided by the XtremSplit website.'
s.required_ruby_version = '>= 1.8.5'
s.require_paths = ['xtmfile']
s.files = FileList[
"xtmfile/*.rb",
"bin/*",
].to_a + [
"Makefile",
"xtm-utils.gemspec",
"COPYING",
"README.rdoc"
]
s.files.reject! { |fn| fn.include? "coverage" }
puts "== GEM CONTENT =="
puts s.files
puts "== /GEM CONTENT =="
end