You are not logged in.

#1 2013-01-19 17:44:00

iljo
Member
From: Croatia
Registered: 2008-11-26
Posts: 29

[SOLVED] Linux way of installing custom applications

Hi,
now this is what's bugging me. Assume I want to install custom appliction on my archlinux system, so that every user can use it normally. Where to put it, so that it would not violate standard Linux hier? Also if I don't want/know/have time to create AUR pkgbuild for it?

  1. In "/opt/app_name"?

  2. Maybe put binaries in  it in "/usr/local/bin", libraries in "/usr/local/lib", logs in... But aren't here arch specific files?

To be direct, here is content of archived application (it's a game called CreepTD):

CreepTD/LICENSE
CreepTD/bin/creeptd-client.jar
CreepTD/bin/creeptd-client.jar.ver
CreepTD/bin/creeptd-launcher.ver
CreepTD/bin/creeptd-music.jar
CreepTD/bin/creeptd-music.jar.ver
CreepTD/config/client.ctdc
CreepTD/logs/creeptd-client-last.log
CreepTD/logs/creeptd-client.log
CreepTD/logs/creeptd-launcher.log
CreepTD/maps/.placeholder
CreepTD/replays/.placeholder
CreepTD/themes/.placeholder
CreepTD/CreepTD.desktop
CreepTD/CreepTD.ico
CreepTD/CreepTD
CreepTD/bin/bootstrap.jar
CreepTD/bin/creeptd-launcher.jar

I would like to know this in general (not just for this application), please.

Last edited by iljo (2013-01-20 21:07:49)

Offline

#2 2013-01-19 17:55:13

Arctus
Member
Registered: 2012-07-14
Posts: 99

Re: [SOLVED] Linux way of installing custom applications

Just use /opt or /usr/local. AUR packages with "stand alone" applications like Dropbox usually use /opt, but the standard repos doesn't touch either of those.

Offline

#3 2013-01-19 17:59:10

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,730
Website

Re: [SOLVED] Linux way of installing custom applications

Write a PKGBUILD which will take you all of 3 min to do.  Your have already identified the files and their rel paths.  You only need to use the install command in the PKGBUILD. Here is an example that only installs files (does not compile anything): https://aur.archlinux.org/packages/pr/p … n/PKGBUILD

This will answer your original question: https://wiki.archlinux.org/index.php/Ar … irectories

Last edited by graysky (2013-01-19 18:04:07)

Offline

#4 2013-01-19 18:07:14

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Linux way of installing custom applications

iljo wrote:

don't want/know/have time to create AUR

I assume you mean create a pkgbuild.

You should REALLY create a pkgbuild. Otherwise, I would go with /usr/local/{bin,lib,share}

Offline

#5 2013-01-19 18:59:15

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: [SOLVED] Linux way of installing custom applications

iljo wrote:

Hi,
now this is what's bugging me. Assume I want to install custom appliction on my archlinux system, so that every user can use it normally. Where to put it, so that it would not violate standard Linux hier? Also if I don't want/know/have time to create AUR for it?

  1. In "/opt/app_name"?

  2. Maybe put binaries in  it in "/usr/local/bin", libraries in "/usr/local/lib", logs in... But aren't here arch specific files?

Creating packages with PKGBUILDs is really simple. Just keep the wiki page open and take a look at a few examples from the repos and AUR. It only takes a couple of minutes more to fill out metadata and then all of your files will be tracked by pacman. You will avoid clutter and ensure dependency handling. It is the right way to do this. Don't be lazy as you will end up with more work later.



All that said, I was going to write a PKGBUILD in a few minutes just to prove how simple it was. Of course, it wasn't. tongue

The application downloads files to the installation directory, so it cannot be installed centrally. It really is meant to be installed by each user individually. Nevertheless, I used a workaround to create a package. Take a look at the PKGBUILD and try to understand what it does. You really should learn how to write your own PKGBUILDs. It's just a shame that this particular package was more complicated than usual.

You can find the package here on the AUR.

Last edited by Xyne (2013-01-19 19:00:09)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2013-01-19 19:07:24

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Linux way of installing custom applications

Xyne wrote:

Just keep the wiki page open and take a look at a few examples from the repos and AUR.

Alternatively, just go to "/usr/share/pacman/" on your computer and copy the appropriate PKGBUILD file template.

Last edited by drcouzelis (2013-01-19 19:10:55)

Offline

#7 2013-01-19 20:15:45

iljo
Member
From: Croatia
Registered: 2008-11-26
Posts: 29

Re: [SOLVED] Linux way of installing custom applications

Thank you all!

Xyne wrote:

The application downloads files to the installation directory, so it cannot be installed centrally. It really is meant to be installed by each user individually. Nevertheless, I used a workaround to create a package. Take a look at the PKGBUILD and try to understand what it does. You really should learn how to write your own PKGBUILDs. It's just a shame that this particular package was more complicated than usual.

Yes, this app is not very friendly for package builders, who want to have good package. I've looked at your PKGBUILD, interesting workaround.  smile

I will learn how to make pkgbuild, was planning it maybe for too long, but it's time!
Anyway, I also wanted to know where would somebody put application like this, regardless of distro.

Last edited by iljo (2013-01-19 20:17:08)

Offline

#8 2013-01-19 22:19:40

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: [SOLVED] Linux way of installing custom applications

I tend to use /usr/local for this stuff. I haven't come across any packages which use that (either AUR or otherwise).  I use GNU stow to manage most stuff under /usr/local except for TeX Live where I use tlmgr.

I know that the recommendation is to create a pkgbuild but there are advantages to doing it this way. TeX Live recommends not installing as root and it provides its own management utility. Things get complex when that's not available. I use special unprivileged users to manage software under /usr/local (texlive for the TeX Live, software for everything else). It also makes it possible to have both the Arch version and an independent version of an application installed. So I use Mozilla's build of Firefox and have Arch's as a fallback. (Arch's doesn't work in my language whereas Mozilla's does.)

But you do need to be aware of what you've done, what you are doing and what might cause problems. Because /usr/local is a separate partition on my system, in a worst case scenario I can just comment the line in fstab and prevent the software showing up in the system's paths at all. I like the fact that pulling it in its entirety is merely a matter of adding one # to a config file!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2013-01-19 23:20:52

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] Linux way of installing custom applications

iljo wrote:

Anyway, I also wanted to know where would somebody put application like this, regardless of distro.

What's wrong with /usr/local/*, as it has been suggested twice?

Offline

#10 2013-01-20 03:56:33

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: [SOLVED] Linux way of installing custom applications

I didn't read that as rejecting those answers. I thought it was more a question of explaining why the OP wanted a general answer even if, in this particular case, it turns out that the application needs a different home.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2013-01-20 18:11:48

iljo
Member
From: Croatia
Registered: 2008-11-26
Posts: 29

Re: [SOLVED] Linux way of installing custom applications

Awebb wrote:
iljo wrote:

Anyway, I also wanted to know where would somebody put application like this, regardless of distro.

What's wrong with /usr/local/*, as it has been suggested twice?

As cfr wrote, nothing is wrong, it's just a explanation why I asked question.

@cfr I didn't know of GNU Stow, but it looks worth a try smile

Offline

#12 2013-01-20 19:37:05

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,168

Re: [SOLVED] Linux way of installing custom applications

Don't forget to mark the thread [solved] if you have the answer you wanted. Just edit your initial post.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB