aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 3a7d8aada61b50c446f4cdbecc9fe147f307eeba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Copyright (C) 2013 THE isodumper'S COPYRIGHT HOLDER
# This file is distributed under the same license as the isodumper package.

# This Makefile is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# Author isodumper software= papoteur <papoteur@mageialinux-online.org>
# Author Makefile file= Geiger David <david.david@mageialinux-online.org>

PREFIX=/usr
BINDIR=$(PREFIX)/bin
SBINDIR=$(PREFIX)/sbin
LIBDIR=$(PREFIX)/lib
LIBEXECDIR=$(PREFIX)/libexec
POLKITPOLICYDIR=$(PREFIX)/share/polkit-1/actions
DATADIR=$(PREFIX)/share
ICONSDIR=$(PREFIX)/share/icons
PIXMAPSDIR=$(PREFIX)/share/pixmaps
LOCALEDIR=$(PREFIX)
DOCDIR=$(PREFIX)/share/doc/isodumper
PYTHON=/usr/bin/env python
DIRS = polkit

all: dirs

dirs:
	@for n in . $(DIRS); do \
		[ "$$n" = "." ] || make -C $$n || cd .. || exit 1 ;\
	done

clean:
	rm -f polkit/isodumper polkit/org.mageia.isodumper.policy \
	isodumper.tar.xz


install: all

	# for binary file script isodumper on /usr/libexec/
	mkdir -p $(DESTDIR)$(LIBEXECDIR)
	install -m 755 isodumper $(DESTDIR)$(LIBEXECDIR)

	# for binary file isodumper on /usr/bin/ 
	# to have authentication with polkit (use for mageia policy)
	mkdir -p $(DESTDIR)$(BINDIR)
	install -m 755 polkit/isodumper $(DESTDIR)$(BINDIR)

	# for policy file isodumper on /usr/share/polkit-1/actions/ 
	# to have authentication with polkit (use for mageia policy)	
	mkdir -p $(DESTDIR)$(POLKITPOLICYDIR)
	install -m 644 polkit/org.mageia.isodumper.policy $(DESTDIR)$(POLKITPOLICYDIR)

	# for LIBFILES isodumper.py raw_format.py
	mkdir -p $(DESTDIR)$(LIBDIR)/isodumper
	install -m 755 lib/isodumper.py $(DESTDIR)$(LIBDIR)/isodumper
	install -m 755 lib/raw_format.py $(DESTDIR)$(LIBDIR)/isodumper

	# for DATADIR isodumper.py header.png
	mkdir -p $(DESTDIR)$(DATADIR)/isodumper
	install -m 644 share/isodumper/isodumper.glade $(DESTDIR)$(DATADIR)/isodumper
	install -m 644 share/isodumper/header.png $(DESTDIR)$(DATADIR)/isodumper

	# for isodumper desktop menu entry
	mkdir -p $(DESTDIR)$(DATADIR)/applications
	install -m 644 share/applications/isodumper.desktop $(DESTDIR)$(DATADIR)/applications

	# for isodumper doc 
	mkdir -p $(DESTDIR)$(DOCDIR)
	install -m 644 COPYING.GPL COPYING.LGPL CHANGELOG README.md i18n.md $(DESTDIR)$(DOCDIR)

	# for isodumper icons
	#NOTE: You must install imagemagick package.
	mkdir -p $(DESTDIR)$(ICONSDIR)
	convert isodumper.png -geometry 32x32 $(DESTDIR)$(ICONSDIR)/isodumper.png
	mkdir -p $(DESTDIR)$(ICONSDIR)/mini
	convert isodumper.png -geometry 20x20 $(DESTDIR)$(ICONSDIR)/mini/isodumper.png
	mkdir -p $(DESTDIR)$(ICONSDIR)/large
	convert isodumper.png -geometry 48x48 $(DESTDIR)$(ICONSDIR)/large/isodumper.png
	mkdir -p $(DESTDIR)$(PIXMAPSDIR)
	install -m 644 isodumper.png $(DESTDIR)$(PIXMAPSDIR)
	for png in 128x128 64x64 48x48 32x32 22x22 16x16; \
	do \
	mkdir -p $(DESTDIR)$(ICONSDIR)/hicolor/$$png/apps; \
	convert isodumper.png -geometry $$png $(DESTDIR)$(ICONSDIR)/hicolor/$$png/apps/isodumper.png; \
	done
	mkdir -p $(DESTDIR)$(ICONSDIR)/hicolor/scalable/apps
	install -m 644 isodumper.svg $(DESTDIR)$(ICONSDIR)/hicolor/scalable/apps/isodumper.svg

	# for isodumper.mo translations
	for locale in share/locale/*; \
	do \
	mkdir -p $(DESTDIR)$(LOCALEDIR)/$$locale/LC_MESSAGES; \
	install -m 644 $$locale/LC_MESSAGES/isodumper.mo $(DESTDIR)$(LOCALEDIR)/$$locale/LC_MESSAGES/isodumper.mo; \
	done


tar:
	tar cvJf isodumper.tar.xz *


README.txt: README.md
	pandoc -f markdown -t plain README.md -o README.txt


i18n.txt: i18n.md
	pandoc -f markdown -t plain i18n.md -o i18n.txt