diff mbox series

[v2] gui: Install .desktop files to /usr/share/applications by default

Message ID 20190318133925.3387-1-plautrba@redhat.com (mailing list archive)
State Accepted
Headers show
Series [v2] gui: Install .desktop files to /usr/share/applications by default | expand

Commit Message

Petr Lautrbach March 18, 2019, 1:39 p.m. UTC
/usr/share/applications is a standard directory for .desktop files.
Installation path can be changed using DESKTOPDIR variable in installation
phase, e.g.

make DESKTOPDIR=/usr/local/share/applications install

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
 gui/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Petr Lautrbach March 18, 2019, 3:26 p.m. UTC | #1
Petr Lautrbach <plautrba@redhat.com> writes:

> /usr/share/applications is a standard directory for .desktop 
> files.
> Installation path can be changed using DESKTOPDIR variable in 
> installation
> phase, e.g.
>
> make DESKTOPDIR=/usr/local/share/applications install
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Travis CI passed
https://travis-ci.org/bachradsusi/SELinuxProject-selinux/builds/507842594


> ---
>  gui/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gui/Makefile b/gui/Makefile
> index b2375fbf..ca965c94 100644
> --- a/gui/Makefile
> +++ b/gui/Makefile
> @@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
>  SHAREDIR ?= $(PREFIX)/share/system-config-selinux
>  DATADIR ?= $(PREFIX)/share
>  MANDIR ?= $(PREFIX)/share/man
> +DESKTOPDIR ?= $(PREFIX)/share/applications
>  
>  TARGETS= \
>  booleansPage.py \
> @@ -29,6 +30,7 @@ install: all
>  	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
>  	-mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
>  	-mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
> +	-mkdir -p $(DESTDIR)$(DESKTOPDIR)
>  	install -m 755 system-config-selinux.py 
>  $(DESTDIR)$(SHAREDIR)
>  	install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
>  	install -m 755 polgengui.py 
>  $(DESTDIR)$(BINDIR)/selinux-polgengui
> @@ -44,7 +46,7 @@ install: all
>  	install -m 644 system-config-selinux.png 
>  $(DESTDIR)$(DATADIR)/pixmaps
>  	install -m 644 system-config-selinux.png 
>  $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
>  	install -m 644 system-config-selinux.png 
>  $(DESTDIR)$(DATADIR)/system-config-selinux
> -	install -m 644 *.desktop 
> $(DESTDIR)$(DATADIR)/system-config-selinux
> +	install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
>  	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
>  	install -m 644 sepolicy_256.png 
>  $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
>  	for i in 16 22 32 48 256; do \
Nicolas Iooss March 18, 2019, 9:39 p.m. UTC | #2
On Mon, Mar 18, 2019 at 4:26 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> Petr Lautrbach <plautrba@redhat.com> writes:
>
> > /usr/share/applications is a standard directory for .desktop
> > files.
> > Installation path can be changed using DESKTOPDIR variable in
> > installation
> > phase, e.g.
> >
> > make DESKTOPDIR=/usr/local/share/applications install
> >
> > Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
>
> Travis CI passed
> https://travis-ci.org/bachradsusi/SELinuxProject-selinux/builds/507842594

Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Thanks!
Nicolas

> > ---
> >  gui/Makefile | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/gui/Makefile b/gui/Makefile
> > index b2375fbf..ca965c94 100644
> > --- a/gui/Makefile
> > +++ b/gui/Makefile
> > @@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
> >  SHAREDIR ?= $(PREFIX)/share/system-config-selinux
> >  DATADIR ?= $(PREFIX)/share
> >  MANDIR ?= $(PREFIX)/share/man
> > +DESKTOPDIR ?= $(PREFIX)/share/applications
> >
> >  TARGETS= \
> >  booleansPage.py \
> > @@ -29,6 +30,7 @@ install: all
> >       -mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
> >       -mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
> >       -mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
> > +     -mkdir -p $(DESTDIR)$(DESKTOPDIR)
> >       install -m 755 system-config-selinux.py
> >  $(DESTDIR)$(SHAREDIR)
> >       install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
> >       install -m 755 polgengui.py
> >  $(DESTDIR)$(BINDIR)/selinux-polgengui
> > @@ -44,7 +46,7 @@ install: all
> >       install -m 644 system-config-selinux.png
> >  $(DESTDIR)$(DATADIR)/pixmaps
> >       install -m 644 system-config-selinux.png
> >  $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
> >       install -m 644 system-config-selinux.png
> >  $(DESTDIR)$(DATADIR)/system-config-selinux
> > -     install -m 644 *.desktop
> > $(DESTDIR)$(DATADIR)/system-config-selinux
> > +     install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
> >       -mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
> >       install -m 644 sepolicy_256.png
> >  $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
> >       for i in 16 22 32 48 256; do \
>
Nicolas Iooss March 26, 2019, 9:22 p.m. UTC | #3
On Mon, Mar 18, 2019 at 10:39 PM Nicolas Iooss <nicolas.iooss@m4x.org> wrote:
>
> On Mon, Mar 18, 2019 at 4:26 PM Petr Lautrbach <plautrba@redhat.com> wrote:
> >
> > Petr Lautrbach <plautrba@redhat.com> writes:
> >
> > > /usr/share/applications is a standard directory for .desktop
> > > files.
> > > Installation path can be changed using DESKTOPDIR variable in
> > > installation
> > > phase, e.g.
> > >
> > > make DESKTOPDIR=/usr/local/share/applications install
> > >
> > > Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
> >
> > Travis CI passed
> > https://travis-ci.org/bachradsusi/SELinuxProject-selinux/builds/507842594
>
> Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>
>
> Thanks!
> Nicolas

Merged.

Nicolas

>
> > > ---
> > >  gui/Makefile | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/gui/Makefile b/gui/Makefile
> > > index b2375fbf..ca965c94 100644
> > > --- a/gui/Makefile
> > > +++ b/gui/Makefile
> > > @@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
> > >  SHAREDIR ?= $(PREFIX)/share/system-config-selinux
> > >  DATADIR ?= $(PREFIX)/share
> > >  MANDIR ?= $(PREFIX)/share/man
> > > +DESKTOPDIR ?= $(PREFIX)/share/applications
> > >
> > >  TARGETS= \
> > >  booleansPage.py \
> > > @@ -29,6 +30,7 @@ install: all
> > >       -mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
> > >       -mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
> > >       -mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
> > > +     -mkdir -p $(DESTDIR)$(DESKTOPDIR)
> > >       install -m 755 system-config-selinux.py
> > >  $(DESTDIR)$(SHAREDIR)
> > >       install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
> > >       install -m 755 polgengui.py
> > >  $(DESTDIR)$(BINDIR)/selinux-polgengui
> > > @@ -44,7 +46,7 @@ install: all
> > >       install -m 644 system-config-selinux.png
> > >  $(DESTDIR)$(DATADIR)/pixmaps
> > >       install -m 644 system-config-selinux.png
> > >  $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
> > >       install -m 644 system-config-selinux.png
> > >  $(DESTDIR)$(DATADIR)/system-config-selinux
> > > -     install -m 644 *.desktop
> > > $(DESTDIR)$(DATADIR)/system-config-selinux
> > > +     install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
> > >       -mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
> > >       install -m 644 sepolicy_256.png
> > >  $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
> > >       for i in 16 22 32 48 256; do \
> >
diff mbox series

Patch

diff --git a/gui/Makefile b/gui/Makefile
index b2375fbf..ca965c94 100644
--- a/gui/Makefile
+++ b/gui/Makefile
@@ -5,6 +5,7 @@  BINDIR ?= $(PREFIX)/bin
 SHAREDIR ?= $(PREFIX)/share/system-config-selinux
 DATADIR ?= $(PREFIX)/share
 MANDIR ?= $(PREFIX)/share/man
+DESKTOPDIR ?= $(PREFIX)/share/applications
 
 TARGETS= \
 booleansPage.py \
@@ -29,6 +30,7 @@  install: all
 	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
 	-mkdir -p $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
 	-mkdir -p $(DESTDIR)$(DATADIR)/polkit-1/actions/
+	-mkdir -p $(DESTDIR)$(DESKTOPDIR)
 	install -m 755 system-config-selinux.py $(DESTDIR)$(SHAREDIR)
 	install -m 755 system-config-selinux $(DESTDIR)$(BINDIR)
 	install -m 755 polgengui.py $(DESTDIR)$(BINDIR)/selinux-polgengui
@@ -44,7 +46,7 @@  install: all
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/pixmaps
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/icons/hicolor/24x24/apps
 	install -m 644 system-config-selinux.png $(DESTDIR)$(DATADIR)/system-config-selinux
-	install -m 644 *.desktop $(DESTDIR)$(DATADIR)/system-config-selinux
+	install -m 644 *.desktop $(DESTDIR)$(DESKTOPDIR)
 	-mkdir -p $(DESTDIR)$(DATADIR)/pixmaps
 	install -m 644 sepolicy_256.png $(DESTDIR)$(DATADIR)/pixmaps/sepolicy.png
 	for i in 16 22 32 48 256; do \