You are not logged in.

#1 2013-10-25 16:44:51

Leios
Member
From: Okinawa, JP
Registered: 2012-03-16
Posts: 73
Website

FITS viewer (fv) command installation

For my university research, I use the fv command frequently. It is not in the AUR, but it is easy enough to install. I just have to download and untar the file. The fv command is ready to be used from that directory, no additional building necessary; however, I would like to "properly" install it in my /usr/bin directory. Because it depends on the other files in the tarred directory, it is not as simple as cp'ing it to my /usr/bin directory. It also does not come with configuration files. For the past few months, I had just created a simple script that calls the directory fv was originally unpacked in. This solution is no better than setting a path variable in my ~/.bashrc and does not work for multiple users very well. I could just copy the entire directory into my /usr/bin, but that seems like a horribly messy idea.

How do I go about properly installing a package like this to my system?

After that, I would like to host this package in the AUR (simply because a few of my friends have complained about it not being there to begin with).

Thanks,
Leios

Offline

#2 2013-10-25 16:58:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: FITS viewer (fv) command installation

I don't know what the proper place for these files would be, but you can try /opt/fv .
The wiki has info about how to make a PKGBUILD.

Offline

#3 2013-10-25 17:02:32

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: FITS viewer (fv) command installation

Make a PKGBUILD, or if you just want it to be easy and hacky you can add it to the $PATH in /etc/profile which most shells read from frist.


since 2009

Offline

#4 2013-10-25 17:14:34

Leios
Member
From: Okinawa, JP
Registered: 2012-03-16
Posts: 73
Website

Re: FITS viewer (fv) command installation

karol: So I cp'd the files to /opt/fv and the cp'd the command to /usr/bin. That didn't work. =/

gonX: I cannot make a PKGBUILD until I know how to build it on my system first. At least, that's how I'm reading the wiki. Also, is the latter solution a fair way to make an AUR package? I thought that would be "cheating" in a way.

Also, sorry for being new at this. I really am trying to learn.

Last edited by Leios (2013-10-25 17:15:21)

Offline

#5 2013-10-25 17:17:43

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: FITS viewer (fv) command installation

I meant copy all these files to /opt/fv/
See https://aur.archlinux.org/packages/pa/p … n/PKGBUILD


Leios wrote:

Also, sorry for being new at this. I really am trying to learn.

Nobody expects you to know everything right from the start :-)

Last edited by karol (2013-10-25 17:19:23)

Offline

#6 2013-10-25 17:40:01

Leios
Member
From: Okinawa, JP
Registered: 2012-03-16
Posts: 73
Website

Re: FITS viewer (fv) command installation

Will the format of the file you linked work even if I don't have a .install file? Do I have to make one? Also, the very last line installs it to the /usr/bin directory...

Would it be poor AUR etiquette to copy the files to /opt/fv/ and then create an executable file "fv" that calls the fv command from that directory? I tried that and it seems to work just fine.

Offline

#7 2013-10-25 17:44:57

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: FITS viewer (fv) command installation

If it requires that specific directory structure, the correct way to install is to put the entire structure under /opt then make a symlink in /usr/bin pointing to the executable. Not a good solution, but when you're dealing with software that's written in Window's style, there's not much else you can do.

Last edited by Scimmia (2013-10-25 17:52:32)

Offline

#8 2013-10-25 17:48:12

Leios
Member
From: Okinawa, JP
Registered: 2012-03-16
Posts: 73
Website

Re: FITS viewer (fv) command installation

Scimmia wrote:

If it requires that specific directory structure, the correct way to install is to put the entire structure under /opt then make a symlink in /usr/bin pointing to the executable. Not a good solution, but when you're dealing with software that's written in Window's style, there's not much else you can do.

Ah. That sounds like what I've gotta do. Thanks.

Offline

#9 2013-10-25 17:48:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: FITS viewer (fv) command installation

We had a little discussion about the symlinking part https://aur.archlinux.org/packages/pacmanxg4-bin/ but seems the symlink is not created at all now ...
Sorry for the confusion, I should have checked the PKGBUILD before recommending it ;P

Last edited by karol (2013-10-25 17:51:19)

Offline

#10 2013-10-25 17:54:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: FITS viewer (fv) command installation

Looking a bit more, the source is available and uses an autotools configure script. It should be able to be built and installed with that into the regular dir structure.

Offline

#11 2013-10-25 18:28:35

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: FITS viewer (fv) command installation

Moving to Creating and Modifying Packages...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#12 2013-10-25 19:34:46

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: FITS viewer (fv) command installation

Leios wrote:

karol: So I cp'd the files to /opt/fv and the cp'd the command to /usr/bin. That didn't work. =/

gonX: I cannot make a PKGBUILD until I know how to build it on my system first. At least, that's how I'm reading the wiki. Also, is the latter solution a fair way to make an AUR package? I thought that would be "cheating" in a way.

Also, sorry for being new at this. I really am trying to learn.

You don't need to be able to build it to be able to use a PKGBUILD. I suppose it's a bit misleading name. It could be something as simple as this:

pkgname=fits-viewer
pkgver=1.0
pkgrel=1
pkgdesc="NASA FV"
arch=('i686' 'x86_64')
source=fv.zip

build() {
    mkdir -p ${pkgdir}/opt/fv
    mkdir -p ${pkgdir}/usr/bin
    unzip fv.zip -d ${pkgdir}/opt/fv/
    ln -s /opt/fv/fv ${pkgdir}/usr/bin/fv
}

.install files are run after the installation, for example if you have to initialize something on install or on uninstallation

The easiest example would be to run something like abs core/linux and check your /var/abs/core/linux directory for the files.

Last edited by gonX (2013-10-25 19:36:25)


since 2009

Offline

#13 2013-10-25 22:19:37

Leios
Member
From: Okinawa, JP
Registered: 2012-03-16
Posts: 73
Website

Re: FITS viewer (fv) command installation

Okay. I certainly have a plan of attack. Thanks guys.

Quick question:

If I create a file that reads "exec /opt/fv/fv," give it executable privileges, and then then throw the file into the /usr/bin directory, the command runs perfectly fine; however, when I create a symlink with the command "ln -s /opt/fv/fv /usr/bin/fv" the command will not function appropriately (in fact, it will function as if I had cp'd only the fv command, itself, into the /usr/bin directory). Why is this the case?

Last edited by Leios (2013-10-25 22:21:13)

Offline

#14 2013-10-26 23:09:39

Leios
Member
From: Okinawa, JP
Registered: 2012-03-16
Posts: 73
Website

Re: FITS viewer (fv) command installation

UPDATE: because the symbolic link would not work, I tried to download the source code that is also readily avaliable. Unfortunately, this code is ~75MiB wheras the other files I have been working with are only 3.5 MiB (roughly 20x as small). Even though the source file might be more "correct," it also comes with a longer download time and plenty of files that are not useful. Would it be better to use the larger source file or just use the smaller and direct linux 64 and 32 packages already available?

Personally, I would rather just use the smaller files, but figured I should ask if this could cause problems later on for certain individuals.

Offline

#15 2013-10-26 23:21:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: FITS viewer (fv) command installation

It's often the case that the source code is much larger than the binaries. You also need to spend time compiling and have enough RAM to do it.
There's no need to pick one way over the other - you can have two packages: foo and foo-bin.

Offline

#16 2013-10-26 23:22:52

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: FITS viewer (fv) command installation

Check the executable with ldd and see what libraries it's complaining about. You can copy those to their respective locations in /usr/lib, assuming you're using the PKGBUILD.
Alternatively you can add a file with the appropriate path in it to /etc/ld.so.conf.d/ to make the system check for missing .so files from there.

Building from source is the ideal thing, but if you just want to make something work quickly, there's probably no way around it.

Last edited by gonX (2013-10-26 23:23:42)


since 2009

Offline

#17 2013-10-27 06:31:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: FITS viewer (fv) command installation

Leios, I think you missed the point completely. The binaries you're downloading are built from the same source, so they'll end up being about the same size. The size of the source download doesn't mean much.

I decided to see if I could make a PKGBUILD to build from source. Unfortunately, it won't build with tcl 8.6 because it uses features that have been deprecated for 10 years and finally removed. I'm not going to start patching the source, so I'm done here.

Offline

#18 2013-10-27 15:03:43

Leios
Member
From: Okinawa, JP
Registered: 2012-03-16
Posts: 73
Website

Re: FITS viewer (fv) command installation

That was the same problem I ran into, which was why I ended up packaging it the way I did. I know it is an incredibly messy solution, but it was one that worked. I will come back to it to try to figure it all out later, but until then if anyone more experienced wants to come by and repackage it, I will not be the least bit offended.

Also, for the record, I know the end result will be the same, but it will also take much longer to download the source. I didn't know if a larger download time was worth the same end result (that was my question, really). The answer to that question was: always go for the source when available. Unfortunately, getting the source to make was difficult, and I have other things to do, so I did what I did.

Again, feel free to repackage.

Offline

Board footer

Powered by FluxBB