Skip to content

Commit

Permalink
Merge pull request #2 from fgaz/stop-hardcoding-prefix
Browse files Browse the repository at this point in the history
build: Stop hardcoding prefix
  • Loading branch information
paoloose authored Mar 17, 2023
2 parents 4d18136 + 0d12df5 commit a3a33d0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ LIBS = gtk+-3.0 x11 jansson
CFLAGS += `pkg-config --cflags $(LIBS)` -Wall -Wno-unused-parameter -std=gnu99 -I/usr/include/gtk-3.0/
LDLIBS += `pkg-config --libs $(LIBS)`

BIN_DIR = /usr/local/bin
PREFIX = /usr/local
BIN_DIR = $(PREFIX)/bin
APP = urn.desktop
APP_DIR = /usr/share/applications
DATADIR = $(PREFIX)/share
APP_DIR = $(DATADIR)/applications
ICON = urn.png
ICON_DIR = /usr/share/icons/hicolor
SCHEMAS_DIR = /usr/share/glib-2.0/schemas
ICON_DIR = $(DATADIR)/icons/hicolor
SCHEMAS_DIR = $(DATADIR)/glib-2.0/schemas

$(BIN): $(OBJS)

Expand All @@ -33,13 +35,13 @@ install:
gtk-update-icon-cache -f -t $(ICON_DIR)
install -Dm644 urn-gtk.gschema.xml $(SCHEMAS_DIR)/urn-gtk.gschema.xml
glib-compile-schemas $(SCHEMAS_DIR)
mkdir -p /usr/share/urn/themes
rsync -a --exclude=".*" themes /usr/share/urn
mkdir -p $(DATADIR)/urn/themes
rsync -a --exclude=".*" themes $(DATADIR)/urn

uninstall:
rm -f $(BIN_DIR)/$(BIN)
rm -f $(APP_DIR)/$(APP)
rm -rf /usr/share/urn
rm -rf $(DATADIR)/urn
for size in 16 22 24 32 36 48 64 72 96 128 256 512; do \
rm -f $(ICON_DIR)/"$$size"x"$$size"/apps/$(ICON) ; \
done
Expand Down

0 comments on commit a3a33d0

Please sign in to comment.