diff --git a/Gemfile.lock b/Gemfile.lock index fc15f40..f14e312 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,11 +1,13 @@ PATH remote: . specs: - qasim (0.1.12) + qasim (0.1.10) + qtbindings (~> 4.8.6.0) GEM remote: https://rubygems.org/ specs: + qtbindings (4.8.6.0) rake (10.3.2) PLATFORMS diff --git a/Makefile b/Makefile index e1d8764..3c4482b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ NAME=qasim -DESTDIR=/usr/local +DESTDIR= DEV_DESTDIR=tmp CONFDIR=$(DESTDIR)/etc BINDIR=$(DESTDIR)/usr/bin @@ -8,7 +8,7 @@ MANDIR=$(DESTDIR)/usr/share/man DOCDIR=$(DESTDIR)/usr/share/doc SHAREDIR=$(DESTDIR)/usr/share -RUBYVERSION=1.8 +RUBYVERSION=2.0 RDOC=rdoc$(RUBYVERSION) all: \ @@ -94,7 +94,7 @@ install-ui: $(RBUI_FILES) # FIXME install %_ui.rb: %.ui - bundle exec rbuic4 $< -o $@ + rbuic4 $< -o $@ sed -e '/^module Ui/,/^end # module Ui/d' \ -i $@ @@ -102,11 +102,13 @@ install-ui: $(RBUI_FILES) ## BINARY SECTION clean-bin: - # make no sense in ruby + # remove external packages + rm -fr vendor/bundle build-bin: install-bin: + env |sort mkdir -p $(BINDIR) for binfile in bin/*.rb ; do \ BINFILE=`basename $$binfile |sed -e 's/.rb$$//'`; \ @@ -136,8 +138,11 @@ build-data: install-data: ## Install man pages - # mkdir -p $(MANDIR)/man1 - # cat $(NAME).1 | gzip > $(MANDIR)/man1/$(NAME).1.gz + mkdir -p $(MANDIR)/man1 + for binfile in bin/*.rb ; do \ + BINFILE=`basename $$binfile |sed -e 's/.rb$$//'`; \ + cat man/$${BINFILE}.1 | gzip > $(MANDIR)/man1/$${BINFILE}.1.gz ; \ + done # ## Install icons mkdir -p $(SHAREDIR)/$(NAME)/icons diff --git a/bin/qasim-cli.rb b/bin/qasim-cli similarity index 100% rename from bin/qasim-cli.rb rename to bin/qasim-cli diff --git a/bin/qasim-gui.rb b/bin/qasim-gui similarity index 97% rename from bin/qasim-gui.rb rename to bin/qasim-gui index a3925c5..4fe9eb1 100755 --- a/bin/qasim-gui.rb +++ b/bin/qasim-gui @@ -1,7 +1,5 @@ #!/usr/bin/env ruby -#require 'rubygems' -#require 'bundler/setup' require 'Qt4' $DEBUG = true @@ -10,14 +8,14 @@ $VERBOSE = true require 'pp' require 'set' require 'fcntl' +require 'pathname' -QASIM_INCLUDE_DIR = "lib" -QASIM_DATA_DIR = "." +QASIM_INCLUDE_DIR = Pathname.new(File.dirname(__FILE__)).parent + "lib" +QASIM_DATA_DIR = Pathname.new(File.dirname(__FILE__)).parent + "data" $:.push QASIM_INCLUDE_DIR require 'qasim' - require 'qasim/qasim_qrc' # QaSiM // Qt Sshfs Mapper diff --git a/conf/qasim.desktop b/conf/qasim.desktop index b2d5e69..c938a66 100644 --- a/conf/qasim.desktop +++ b/conf/qasim.desktop @@ -9,6 +9,5 @@ Type=Application Icon=printer NotShowIn= X-Desktop-File-Install-Version=0.15 -Categories=KDE;GTK;Monitor;System; StartupNotify=true -Categories=KDE;Qt;Network;System;Utility; +Categories=KDE;Qt;GTK;Network;System;Utility; diff --git a/debian/control b/debian/control index bf1a68a..ef4210b 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.7.2 Package: qasim Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, sshfs (>= 1.7), ruby2.0, libqt4-ruby, rubygems +Depends: ${shlibs:Depends}, ${misc:Depends}, sshfs (>= 1.7), ruby, libqt4-ruby, rubygems Description: Easy mount solution for SSH filesystems. Qasim is a front-end for sshfs, the filesystem client based on fuse and ssh. It provides automating and global settings control for sshfs mounts. diff --git a/debian/rules b/debian/rules index 4befa4e..55818a2 100755 --- a/debian/rules +++ b/debian/rules @@ -7,38 +7,29 @@ # 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 - - - +export DH_VERBOSE=1 configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. - touch configure-stamp - build: build-stamp build-stamp: configure-stamp dh_testdir - # Add here commands to compile the package. - $(MAKE) + $(MAKE) DESTDIR=$(CURDIR)/debian/qasim build #docbook-to-man debian/qasim.sgml > qasim.1 - touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp - # Add here commands to clean up after the build process. $(MAKE) clean - dh_clean install: build @@ -46,7 +37,6 @@ install: build dh_testroot dh_clean -k dh_installdirs - # Add here commands to install the package into debian/qasim. $(MAKE) DESTDIR=$(CURDIR)/debian/qasim install diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 diff --git a/lib/qasim/config.rb b/lib/qasim/config.rb index 0162c06..451c2c8 100644 --- a/lib/qasim/config.rb +++ b/lib/qasim/config.rb @@ -1,5 +1,3 @@ -#!/usr/bin/ruby -# vim: set ts=4 sw=4: require 'optparse' require 'ostruct' @@ -36,7 +34,7 @@ module Qasim @maps = [] map_dirs = [@config_dir, APP_SYSCONFIG_DIR].select{ |d| - File.exists? d and File.directory? d + File.exist? d and File.directory? d } Find.find( *map_dirs ) do |path| if File.file? path diff --git a/lib/qasim/configold.rb b/lib/qasim/configold.rb index dfdde22..bb09ec2 100644 --- a/lib/qasim/configold.rb +++ b/lib/qasim/configold.rb @@ -1,5 +1,3 @@ -#!/usr/bin/ruby -# vim: set ts=4 sw=4: require 'optparse' require 'ostruct' diff --git a/lib/qasim/version.rb b/lib/qasim/version.rb index 169b85c..b39b9fb 100644 --- a/lib/qasim/version.rb +++ b/lib/qasim/version.rb @@ -1,5 +1,5 @@ module Qasim APP_NAME = "Qasim" - APP_VERSION = "0.1" - APP_DATE = "2012-08-02" + APP_VERSION = "0.1.10" + APP_DATE = "2014-05-09" end diff --git a/man/qasim-cli.1 b/man/qasim-cli.1 new file mode 100644 index 0000000..3c55799 --- /dev/null +++ b/man/qasim-cli.1 @@ -0,0 +1,98 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH QASIM-CLI 1 "august 12, 2014" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) + + +.SH NAME + +sshfs-mapper \- A small utility for automatizing sshfs mounts. + + +.SH SYNOPSIS + +.B sshfs-mapper +.RI [ options ] + + +.SH DESCRIPTION +This manual page documents briefly the +.B sshfs-mapper +command. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBsshfs-mapper\fP is a program that... + + + +.SH OPTIONS + +.TP +.B \-h\fP, \fB--help +Show summary of options. +.TP +.B \-i\fP, \fB--init +Initialize sshfs-mapper configuration. +.TP +.B \-l\fP, \fB--list +List available maps. +.TP +.B \-a\fP, \fB--all +Select all maps. +.TP +.B \-s\fP, \fB--select \fImap\fP +Only use specified map. +.TP +.B \-u\fP, \fB--umount +Umount maps (mount if the flag is not specified). +.TP +.B \-v\fP, \fB--verbose +Show version of program. + + +.SH FILES + +.TP +$XDG_CONFIG_HOME/sshfs-mapper/config + +Global settings file. + +.TP +$XDG_CONFIG_HOME/sshfs-mapper/*.map + +Per-host configuration and mappings. + + +.SH CONFIGURATION + +Configuration file is stored inside $XDG_CONFIG_HOME/sshfs-mapper/ . +Global settings are storend in the \fBconfig\fP file a FIXME + +.SH SEE ALSO + +.BR sshfs (1), +.BR ssh (1), +.BR ssh-keygen (1). + + +.SH AUTHOR + +sshfs-mapper was written by Glenn.Rolland . +.PP +This manual page was written by Glenn ROLLAND , +for the Debian project (but may be used by others). diff --git a/man/qasim-gui.1 b/man/qasim-gui.1 new file mode 100644 index 0000000..024864f --- /dev/null +++ b/man/qasim-gui.1 @@ -0,0 +1,98 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH QASIM-GUI 1 "august 12, 2014" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) + + +.SH NAME + +qasim-gui \- A small utility for automatizing sshfs mounts - GUI version + + +.SH SYNOPSIS + +.B qasim-gui +.RI [ options ] + + +.SH DESCRIPTION +This manual page documents briefly the +.B sshfs-mapper +command. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBsshfs-mapper\fP is a program that... + + + +.SH OPTIONS + +.TP +.B \-h\fP, \fB--help +Show summary of options. +.TP +.B \-i\fP, \fB--init +Initialize sshfs-mapper configuration. +.TP +.B \-l\fP, \fB--list +List available maps. +.TP +.B \-a\fP, \fB--all +Select all maps. +.TP +.B \-s\fP, \fB--select \fImap\fP +Only use specified map. +.TP +.B \-u\fP, \fB--umount +Umount maps (mount if the flag is not specified). +.TP +.B \-v\fP, \fB--verbose +Show version of program. + + +.SH FILES + +.TP +$XDG_CONFIG_HOME/sshfs-mapper/config + +Global settings file. + +.TP +$XDG_CONFIG_HOME/sshfs-mapper/*.map + +Per-host configuration and mappings. + + +.SH CONFIGURATION + +Configuration file is stored inside $XDG_CONFIG_HOME/sshfs-mapper/ . +Global settings are storend in the \fBconfig\fP file a FIXME + +.SH SEE ALSO + +.BR sshfs (1), +.BR ssh (1), +.BR ssh-keygen (1). + + +.SH AUTHOR + +sshfs-mapper was written by Glenn.Rolland . +.PP +This manual page was written by Glenn ROLLAND , +for the Debian project (but may be used by others). diff --git a/sshfs-mapper.1 b/man/sshfs-mapper.1 similarity index 100% rename from sshfs-mapper.1 rename to man/sshfs-mapper.1 diff --git a/qasim.gemspec b/qasim.gemspec index 02428c9..bb8a7bd 100644 --- a/qasim.gemspec +++ b/qasim.gemspec @@ -16,10 +16,15 @@ Gem::Specification.new do |spec| spec.license = "GPL-3" spec.files = `git ls-files`.split($/) + .concat(Dir['*/**/*_ui.rb']) + .concat(Dir['*/**/*_qrc.rb']) + spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] spec.add_development_dependency "bundler", "~> 1.5" spec.add_development_dependency "rake" + + spec.add_runtime_dependency "qtbindings", "~> 4.8.6.0" end