How to transfer a local installation to a system installation?

Hi all,

I want to build a C++ program called qtVlm on the build service. There is no spec-file available for that yet.
In the make install section it normally moves it to a local directory under the users home directory:

  535s] ***********************************************************
  535s] * Installing qtVlm in  /home/abuild/qtVlm
  535s] ***********************************************************
  535s] mkdir -p ~/qtVlm
  535s] cp -Rf qtVlm tr/ ~/qtVlm
  535s] cp -Rf base_dir/icon base_dir/img base_dir/polar base_dir/dataColors.dat base_dir/boards plugins ~/qtVlm
  535s] mkdir -p ~/qtVlm/grib
  535s] mkdir -p ~/qtVlm/maps
  535s] ***********************************************************
  535s] * Install done ( /home/abuild/qtVlm )
  535s] ***********************************************************

I was juggling around with a couple of options to install this, but was finally not successful.
Has anybody a recommendation how to install this in the %files section of the spec file?
Thanks!

Hi
From;
http://wiki.virtual-loup-de-mer.org/index.php/QtVlm/en#Linux_Installation


The Makefile containing qtVlm now install target, who can do a clean install of qtvlm. 
The installation is default in ~/qtVlm but configurable by editing  the Makefile and changing the variable prefix.

You should be able to use (depending on the variable name in the Makefile)


%install
make INSTALL_DIR=%{_prefix} install

Is it up on OBS at the moment, can you post the link, or even a link to the source tarball you are using.

Hi Malcolm,

Yes, I’ve seen this, but as said, various tries were not successful.
OBS-Link:
https://build.opensuse.org/package/show/home:DocB/qtVlm

Hi
OK, have branched it to see where the files are going, give me an hour or so, have some other stuff to do first :wink:

Hi
So I have it building, but there is stuff to fix :wink:
http://paste.opensuse.org/43222805

Do you want me to go further?

One thing though, I repackaged your svn trunk tarball and made a note in the spec file as follows;


# Source0 via svn export -r2292 svn://svn.code.sf.net/p/qtvlm/code/trunk qtVlm-3.4.4r2292
# tar cvjf qtVlm-3.4.4r2292.tar.bz2 qtVlm-3.4.4r2292/

Using export removes all the svn cruft and bzip2’d it, so instead of your original at 7.7M it’s now only 3.2M :wink:

It also needs a wrapper script to start it so it will create the two directories in the users ~/ and a link in ~/bin.

On Fri 22 Aug 2014 05:36:01 PM CDT, malcolmlewis wrote:

Hi
So I have it building, but there is stuff to fix :wink:
http://paste.opensuse.org/43222805

Do you want me to go further?

One thing though, I repackaged your svn trunk tarball and made a note in
the spec file as follows;

Code:

Source0 via svn export -r2292

svn://svn.code.sf.net/p/qtvlm/code/trunk qtVlm-3.4.4r2292 # tar cvjf
qtVlm-3.4.4r2292.tar.bz2 qtVlm-3.4.4r2292/

Using export removes all the svn cruft and bzip2’d it, so instead of
your original at 7.7M it’s now only 3.2M :wink:

It also needs a wrapper script to start it so it will create the two
directories in the users ~/ and a link in ~/bin.

Hi
So have it building with qt5, it was spitting an error with qt4…
Anyway the problem at present is getting it to recognize ~/ as the
‘working directory’ it wants to write to the application install
directory (/usr/share/qtVlm). I’m not a qt person, but it is failing to
recognize as linux, thinks it’s running windows :wink:


malcolml@ernie:~> qtVlm
Starting-up
currentPath returns:  "/home/malcolml" applicationDirPath returns:
"/usr/share/qtVlm" currentPath modified:  "/usr/share/qtVlm"
applicationDirPath returns:  "/usr/share/qtVlm" Current app path
"/usr/share/qtVlm" home dir ""
[main]: appFoloder for polar:  "/usr/share/qtVlm/polar/"
Creating folder "/usr/share/qtVlm/img/boats/"
Creating folder "/usr/share/qtVlm/tracks/"
[initSetting] no previous file
Loading en
("Windows", "GTK+", "Fusion")
Starting qtVlm -  "qtVlm - ver 3.4-4-patch1+ (August 2014) for Linux 64
bits " Missing maps
Setting map folder to  "maps"
Starting with interpolation:  "Hybride"
GrbDrawing param at start:  -1  /  -1  /  0  frstArw:  -1  /  -1  /  0
secArw:  -1  /  -1  /  0  label:  -1  /  -1  /  0 loading board
langage is "en"
let's quit - bye
result of benchmark: multiThread= 53 monoThread= 69
inside ~myCentralWidget with noSave= false and xmlData true
Error saving POI in  "/usr/share/qtVlm/poi.dat"
Error saving Route in  "/usr/share/qtVlm/poi.dat"
Error saving Barriers in  "/usr/share/qtVlm/poi.dat"
deleting dialogWP

Will work on it tonight, should get it sorted :wink:


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-21-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Thanks a lot for your help - I’m not even a C++ programmer… The two entries ~/qtVlm/grib ~/qtVlm/maps make sense, as this is information that the user should keep locally - similar as the grib data in zyGrib https://build.opensuse.org/package/view_file/Application:Geo/ZYGrib . maybe it is even better to keep this in .qtVLM, but I assume that is something the programmer needs to fix

Hi
I’m not a programmer or sailor either…but have done both… :wink:

Here is the test build here, have no idea for fedora packaging… do you need fedora?
https://build.opensuse.org/package/show/home:malcolmlewis:branches:home:DocB/qtVlm

A few patches and mods to the spec file. I’ve added a wrapper script for the user directory files, however since I’ve used qt5 only for 13.1 and up.

I will sr this to you :wink:

Thanks a lot, I admit I would have not been able to do this! :nerd: I will download and test…and hope to make use of it during our trip from the Canaries to Madeira in 4 weeks. Other thing, you mentioned it threw up error with qt4. What are these errors?

On Mon 25 Aug 2014 10:26:01 AM CDT, DocB wrote:

malcolmlewis;2660945 Wrote:
> A few patches and mods to the spec file. I’ve added a wrapper script
> for the user directory files, however since I’ve used qt5 only for
> 13.1 and up. Thanks a lot, I admit I would have not been able to
> do this! :nerd: I
will download and test…and hope to make use of it during our trip from
the Canaries to Madeira in 4 weeks. Other thing, you mentioned it
threw up error with qt4. What are these errors?

Hi
I’m sure the wrapper can be incorporated into the code it’s self… One
patch should be good for upstream to include
(qtVlm-fix-implicit-definitions.patch) but will leave that to you :wink:

It creates a ~/.qtVlm directory and dumps the files there and from my
brief test seemed to work, hopefully your tests/checks will sort things
out.

Yes, for me it was complaining about one of the qt 4 libs, now that may
be a result of me running a later version of qt for testing
otter-browser. But qt5 is available in 13.1, so unless you have a need
for it to be qt4, I would leave as it is.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-21-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

So, installation went fine, but first test failed:

Unable to write in qtVlm folder /usr/share/qtVlm/testWrite.txt Please change the folder permissions or try to reinstall qtVlm elsewhere

I assume the wrapper needs adjustmend, will try to look into that later

On Tue 26 Aug 2014 10:16:01 AM CDT, DocB wrote:

So, installation went fine, but first test failed:
Code:

Unable to write in qtVlm folder /usr/share/qtVlm/testWrite.txt
Please change the folder permissions or try to reinstall qtVlm
elsewhere -------------------- I assume the wrapper needs adjustmend,
will try to look into that later

Hi
Ahh, forgot about that, must have had a remnant left over from my tests
where I touched the file. It will need some further tweaks to the code.
Will have a look at it later today.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-21-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

On Tue 26 Aug 2014 11:33:04 AM CDT, malcolmlewis wrote:

[QUOTE]
On Tue 26 Aug 2014 10:16:01 AM CDT, DocB wrote:

So, installation went fine, but first test failed:
Code:

Unable to write in qtVlm folder /usr/share/qtVlm/testWrite.txt
Please change the folder permissions or try to reinstall qtVlm
elsewhere -------------------- I assume the wrapper needs adjustmend,
will try to look into that later

Hi
Ahh, forgot about that, must have had a remnant left over from my tests
where I touched the file. It will need some further tweaks to the code.
Will have a look at it later today.

[/QUOTE]
Hi
If the wrapper script didn’t work, I patched out the test (a hack, but
should allow you to test)
https://build.opensuse.org/request/show/246589


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-21-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!