Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: default paths #75

Open
tieugene opened this issue Jul 5, 2020 · 6 comments
Open

Linux: default paths #75

tieugene opened this issue Jul 5, 2020 · 6 comments

Comments

@tieugene
Copy link

tieugene commented Jul 5, 2020

Patch that I use (Note: /usr/lib or /usr/lib64 depends on architecture and/or distributive):

--- src/cconfig.pri.orig	2020-03-07 21:22:00.000000000 +0300
+++ src/cconfig.pri	2020-07-05 17:19:19.698054278 +0300
@@ -33,6 +33,9 @@
 
 
 ############################ BEGIN INSTALLATION FOLDERS DECLARATION ###########################################
+isEmpty(PREFIX) {
+  PREFIX=/usr/local
+}
 
 #message(QXMLEDIT_INST_DATA_DIR = $$(QXMLEDIT_INST_DATA_DIR))
 #message(QXMLEDIT_INST_DIR = $$(QXMLEDIT_INST_DIR))
@@ -49,7 +52,7 @@
     INST_DATA_DIR=$$QXMLEDIT_INST_DATA_DIR
 }
 isEmpty(INST_DATA_DIR) {
-    INST_DATA_DIR = /opt/qxmledit
+    INST_DATA_DIR = $$PREFIX/share/qxmledit
 }
 message("Inst data dir $$INST_DATA_DIR")
 
@@ -60,7 +63,7 @@
     INST_DIR=$$QXMLEDIT_INST_DIR
 }
 isEmpty(INST_DIR) {
-    INST_DIR = /opt/qxmledit
+    INST_DIR = $$PREFIX/bin
 }
 message("Inst dir $$INST_DIR")
 
@@ -72,7 +75,7 @@
 }
 
 isEmpty(INST_DOC_DIR) {
-    INST_DOC_DIR = /opt/qxmledit
+    INST_DOC_DIR = $$PREFIX/share/doc/qxmledit
 }
 message("Inst doc dir $$INST_DOC_DIR")
 
@@ -84,7 +87,7 @@
 }
 
 isEmpty(INST_LIB_DIR) {
-    INST_LIB_DIR = /opt/qxmledit
+    INST_LIB_DIR = $$PREFIX/lib64
 }
 
 message("Inst lib dir $$INST_LIB_DIR")
@@ -97,7 +100,7 @@
 }
 
 isEmpty(INST_INCLUDE_DIR) {
-    INST_INCLUDE_DIR = /opt/qxmledit/include
+    INST_INCLUDE_DIR = $$PREFIX/include/qxmledit
 }
 
 message("Inst include dir $$INST_INCLUDE_DIR")
@lbellonda
Copy link
Owner

Hello, you can use environment variables or qmake command line arguments to customize build to avoid patching project.
See scripts/linux/compile_override.sh for an example of command line parameters.

@tieugene
Copy link
Author

tieugene commented Jul 5, 2020

Hello, you can use environment variables or qmake command line arguments to customize build to avoid patching project.

I know. But this is not user-friendly.
Best way - nothing to add at all (for Linux): qmake [PREFIX=/usr] && make && make install
And each thing must be in right place according to LSB (Linux Standard Base) - RTFM FHS.

See scripts/linux/compile_override.sh for an example of command line parameters.
This script is under git control, so rewriting it will give a conflict during future git pull.

You can use variables for macOS or Windows, but there is no sense to do this in Linux.

But if you want to make "isolate application" in /opt - no problem.
BUT - you must a) provide good integration (library paths, desktop entries etc) and b) bundle all of wanted libs (e.g. whole of linked qt5 :-)

@frederickjh
Copy link
Contributor

@tieugene If you would like to avoid compiling yourself and are on a Linux distribution that supports Snaps I currently maintain a Snap of QXmlEdit that you could install.

@tieugene
Copy link
Author

tieugene commented Sep 3, 2020

@tieugene If you would like to avoid compiling yourself and are on a Linux distribution that supports Snaps I currently maintain a Snap of QXmlEdit that you could install.

As on my fast sight Snap is a) Ubuntu thing and b) provides including all dependencies into "package".
1st is not great problem but 2nd is directly deprecated in Fedora packaging policy.
But thank for advice.

@frederickjh
Copy link
Contributor

@tieugene Sorry if I offended you. Snaps do not use another packaging system not the distributions normal packaging system. They use snapd. Very easy to install and uninstall programs in case you wanted to try it.
How to install qxmledit on Fedora

@lbellonda
Copy link
Owner

The request from tieugene is legitimate, providing native packages for Fedora. Since the variation will introduce a change to other distro maintainers, I think to postpone it and to join it with other install redesigns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants