The Makefile created doesn't allow install in a custom folder.
For example to install in /usr/ instead /usr/local/.
I'm trying to create an AUR package (_for Arch Linux_) but the actual install system doesn't allow this because I need install in a custom folder.
Thank you for your support creating the package. This is going to be fixed today.
I have it. Now you'll be able to use qmake as qmake CONFIG+=packaging to generate a makefile ready for packaging.
The changes with this option are:
/usr/bin/usr/share/icons/usr/share/applications and ready to execute Flameshot from /usr/bin/usr/binI've added a new .desktop file called flameshot-init.desktop as suggested in #10 which keeps the same pattern as flameshot.desktop about the paths when packaging.
I'll push the changes as soon as you can confirm if it is ok for packaging.
No, I'm sorry, I didn't explain it well.
For AUR packaging is necessary to simulate an installation but inside a directory that then will be packaged in order to install with pacman.
In Makefile there is a variable: DESTDIR, this variable should be used in install options before $(INSTALL_ROOT). This way I could install to another directory using make DESTDIR=/tmp install: https://www.gnu.org/prep/standards/html_node/DESTDIR.html
DESTDIR is where the main binary will be placed after the build process in the .pro files processed by qmake. Sadly it works different as in makefiles.
I've added a new variable called BASEDIR before every path and It can be used the same way as the DESTDIR varaible in makefiles.
I'm not an expert using .pro files but this is a decent solution. I promise I wont be breaking this setup until the 1.0 version.
I'll keep what I did yesterday (the config option) because it puts the program in /usr/ and packages should manage programs in that path and not in /usr/local (as pointed here)
That way if you want to install Flameshot in ~/myBuilds/test you would execute:
qmake CONFIG+=packaging BASEDIR=~/myBuilds/test && make install
Is this what you wanted?
I've pushed the changes to master. Just tell me if you find any inconveniences before I close the issue.
It works well now. I have created an AUR package for git version on Arch Linux: https://aur.archlinux.org/packages/flameshot-git/
Thanks! now I'm closing the issue.