I have just read the Ruby User's Guide at http://www.rubyist.net/~slagell/ruby/getstarted.html, I didn't find what I was looking for... which is, How do I use ruby source which I downloaded? There's a Makefile in it, do I just run GNU make -f like for any other source?
All I am trying to do is build and use whatweb (https://github.com/urbanadventurer/WhatWeb/wiki/Installation) from its source package.
Please do read READMEs developers provide. The README will point to https://github.com/urbanadventurer/WhatWeb/wiki/Installation which describe the installation process.
There you find that you need to install dependencies. As already stated Ruby is interpreted and does not need to be compiled.
....If I understad it well, you shouldn't build it(Ruby is an interpreted language). You just run the script like:
$ ./whatweb slashdot.org reddit.com
at "2. Example Usage" from whatweb documentation..
Is that what you need?
Related
My OCaml program uses some functions in the OCaml standard library that were only introduced in version 4.01.0. How can I arrange that when my user compiles my code, the compiler emits an error if the OCaml compiler's version is not 4.01.0 or higher? I feel that this error would be more helpful than just a generic "unbound variable" error.
I see that ocaml -vnum emits "4.01.0" so I guess I could try to check that in my Makefile, but perhaps there is a proper way to do this already? I'm using OCamlBuild, if that helps.
My current Makefile looks like this, by the way:
all:
# echo "Attention: requires OCaml version >= 4.01.0."
ocamlbuild -cflag -annot -lib str -lib unix name_of_my_project.native
mv name_of_my_project.native name_of_my_project
clean:
ocamlbuild -clean
rm -f name_of_my_project
If you already have a Makefile, inserting a check there would probably be the most pragmatic way to achieve this. Can be done using either Makefile expressions or shell. Here's a shell version of a similar check: https://github.com/alavrik/piqi/blob/master/configure#L144
Somewhat related, I was looking for conditional compilation for OCaml and ended up using optcomp. Here's an example.
There is always more than one proper way :) My proper way would be to use oasis. Others would probably use Autotool AC_PROG_OCAML with the specified version. There are other build systems, that probably have their own methods. When you will release your package to opam (it is also very easy), you will add the constraints to the opam file, so that the package manager will not even try to build it.
So, to summarize my personal advice is to use oasis. It is very simple, but still quite versatile. In your case the _oasis control file should looks something like this:
OASISFormat: 0.4
Name: name
Version: 0.0.1
OCamlVersion: >= 4.01.0
Synopsis: Cool package
Authors: Myself
Maintainers: Myself
License: MIT
Copyrights: (C) Myself
Plugins: META (0.4), DevFiles (0.4)
BuildTools: ocamlbuild
Executable "project"
Path: src
MainIs: project.ml
CompiledObject: best
BuildDepends: str, unix
Once the file is created, you can create a configure script with
oasis setup
And after it is ready (it will also create the setup.ml file), you can use the common:
./configure
make
make install
Ultimate Goal:
I'm trying to convert a binary plist file to an xml format so that I can put it in an array and grab values from it. What I'm finding via web search on this is that the command for Linux comes from libplist.
Problem: I ran "yum install libplist" and it told me libplist is already installed and latest version. I've read that if I enter the following command:
plutil -i /mypath/file.plist > /mypath/file.xml.plist
That this will help accomplish my ultimate goal. However, when I do this only a blank file called file.xml.plist is created. Further, with this command and any other command involving plutil, I get a "bash: plutil: command not found. . ." error. Is libplist seemingly not installed (even though it says it is) or why would I repeatedly get this error? Thanks for your help.
You can use yum to look for a package knowing the binary you want. For instance, if I want to install the package that provides plutil, I simply run this command:
$> yum provides plutil
Unfortunately, the result is No matches found... But you say you read that the libplist package provides this tool. Maybe it was renamed ? Let's use repoquery for this (if you don't have it, yum provides repoquery tells you that you need to install yum-utils).
$> repoquery --list libplist
/usr/bin/plistutil
/usr/lib/libplist++.so.3
/usr/lib/libplist++.so.3.0.0
/usr/lib/libplist.so.3
/usr/lib/libplist.so.3.0.0
/usr/share/doc/libplist
/usr/share/doc/libplist/AUTHORS
/usr/share/doc/libplist/COPYING.LESSER
/usr/share/doc/libplist/README
And what I see is that a program called plistutil was installed with this package !
I've never used plutil, so I can't tell you for sure plistutil is the program you want (but it probably is). What I wanted to do instead with this post is to show how you can use yum to install the packages you need !
I ran across this thread while Googling for the same thing myself. After looking at a few solutions for my own company (Screenplay) I decided to fork and iterate on a open-source, cross-platform, drop-in replacement for plutil:
https://github.com/screenplaydev/plutil
It's forked from Facebook's xcbuild (a tool developed by them to build xcode projects on Linux), but stripped down to just provide plist-editting functionality. That way you won't need to maintain separate code-paths for Mac and Linux environments.
Hope that's helpful!
I was wondering if the following is possible.
I have a BASH script that I want to make available for some people but I wanted them to only have to "install" the program and not messing around with terminal, so I thought a .deb would be cool.
So what would the "install" do?
Simple. I want to move the script and an icon to a folder (any folder, but I was wondering some hidden folder in Home) and then run a script that creates a launcher in the Applications menu for the first script. It seems there isn't much to it, but for what I've searched, there doesn't seem to be a lot of info...
How can I accomplish this?
By the way, I'm using Ubuntu 11.04.
Basically (install and) run dh-make to set up the debian/ directory, edit the generated files (mainly remove the many you do not need, and fill in a package description and any dependencies in debian/control), then debuild-us -uc -b.
You may also have to set up a simple Makefile for debian/rules to call; it probably only needs an install target to copy the binary to $(DESTDIR)/usr/bin.
Binaries install into /usr/bin and you should not try to override that. The way to have a menu is to add a .desktop file.
Once you have a good .deb you will need to set up a repo for distributing it. The simplest solution is probably to set up a launchpad.net account and create a personal PPA there.
It's not hard to find more information on these topics, but of course, you need to know what to look for. The canonical documentation is the Debian New Maintainer's Guide.
Found this video on youtube that explains IN FULL the process of creating a *.deb for a script or program and even mentions how to do it for a C program.
Full guide in how to build simple *.deb package
Has one bug, btw, that the author, during the making of the *.deb, didn't notice. The path in the *.desktop file for the EXEC parameter is wrong in the example.
I am trying to install RSense for vim in fedora. I read this manual. I downloaded the tar ball of rsense and extracted it. Then I copied it to the root/opt directory as given on that page. Then I made a directory vim/plugin in the opt directory and copied the rsense.vim in the plugin directory. But when I write :RSenseVersion in the vim editor,I get a message that the command is not recognized.What have I missed ?
Till now I have not installed vim-ruby plugin as staged on the documentation page. What is this plugin meant for ? Can't RSense alone solve my purpose of writing a neat ruby code with auto-completion,code hinting ?
No, you didn't read the manual.
Once all the dependancies are dealt with you must put the plugin in ~/.vim/plugin.
As for the differences between vim-ruby and RSense, I don't do Ruby so I don't know for sure. Looking quickly at their doc, it looks like they are very different in scope and have slightly overlapping features. I'd install both: vim-ruby for all the low-level Vim tuning and RSense for its supposed code intelligence.
But I have a feeling none of them will help you write "neat" ruby code. Only your programing/ruby skills will.
How do you specify in a gem's gemspec that the gem assumes that "fmt" or "tidy" is installed on the system? These are unix tools and not Ruby gems.
This is another place where rubygems just lacks...
A few workarounds:
put a message about it in the post_install message
check for it at runtime
check for it at install time by using a fake mkrf_conf.rb http://en.wikibooks.org/wiki/Ruby_Programming/RubyGems#How_to_install_different_versions_of_gems_depending_on_which_version_of_ruby_the_installee_is_using
You can use the requirements attribute. It doesn't actually enforce the dependency, but it looks like the right place to put the information.
Put it in the README and hope people read it. ;)