Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 160139 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-77 / +63 lines)
Line  Link Here
0
-- Makefile
0
++ Makefile
Lines 1-13 Link Here
1
# KScannerButtons makefile
1
# KScannerButtons makefile
2
#
2
#
3
3
4
PREFIX = /usr/local/
4
VPATH = src
5
ICONPATH = /usr/share/icons/
5
6
LOCALEPATH = /usr/share/locale/
6
PREFIX = /usr/local
7
7
BINDIR = $(PREFIX)/bin
8
GCC = gcc
8
DATADIR = $(PREFIX)/share/kscannerbuttons
9
GPP = g++
9
MENUDIR = $(PREFIX)/share/applications
10
SANECONFIG = `sane-config --libs -cflags`
10
ICONPATH = $(PREFIX)/share/icons
11
LOCALEPATH = $(PREFIX)/share/locale
12
13
LDFLAGS += $(shell sane-config --ldflags)
14
LDLIBS += $(shell sane-config --libs)
15
CPPFLAGS += $(shell sane-config --cflags)
11
16
12
RM = rm -f
17
RM = rm -f
13
INSTALL = install --group=0 --owner=0 --mode=0755
18
INSTALL = install --group=0 --owner=0 --mode=0755
Lines 16-53 Link Here
16
CP = cp -f
21
CP = cp -f
17
MKDIR = mkdir
22
MKDIR = mkdir
18
23
19
INSTALLCMD = $(INSTALL) sanebuttonsd $(PREFIX)bin/sanebuttonsd ; \
20
	$(INSTALL) sane-list-scanners $(PREFIX)bin/sane-list-scanners ; \
21
	$(INSTALL) sane-nb-buttons $(PREFIX)bin/sane-nb-buttons ; \
22
	$(INSTALL) sanebuttonsd-test.sh $(PREFIX)bin/sanebuttonsd-test.sh ; \
23
	if [ ! -d $(PREFIX)share/kscannerbuttons/ ] ; then $(MKDIR) $(PREFIX)share/kscannerbuttons/ ; fi ; \
24
	$(INSTALL) sanebuttonsd.sh $(PREFIX)share/kscannerbuttons/sanebuttonsd.sh ; \
25
	$(INSTALL) kscannerbuttons.sh $(PREFIX)bin/kscannerbuttons ; \
26
	$(INSTALL2) KScannerButtons.kmdr $(PREFIX)share/kscannerbuttons/KScannerButtons.kmdr ; \
27
	$(INSTALL2) KScannerButtons.desktop /usr/share/applnk/Graphics/KScannerButtons.desktop ; \
28
	$(INSTALL2) src/button_ok.png $(ICONPATH)KScannerButtons_ok.png ; \
29
	$(INSTALL2) src/button_cancel.png $(ICONPATH)KScannerButtons_ko.png
30
31
all: sanebuttonsd sane-list-scanners sane-nb-buttons
24
all: sanebuttonsd sane-list-scanners sane-nb-buttons
32
25
33
sanebuttonsd: src/sanebuttonsd.cc
26
sanebuttonsd: src/sanebuttonsd.cc
34
	$(GPP) $(SANECONFIG) src/sanebuttonsd.cc -o sanebuttonsd
35
27
36
sane-list-scanners: src/sane-list-scanners.c
28
sane-list-scanners: src/sane-list-scanners.c
37
	$(GCC) $(SANECONFIG) src/sane-list-scanners.c -o sane-list-scanners
38
29
39
sane-nb-buttons: src/sane-nb-buttons.c
30
sane-nb-buttons: src/sane-nb-buttons.c
40
	$(GCC) $(SANECONFIG) src/sane-nb-buttons.c -o sane-nb-buttons
41
31
42
clean:
32
clean:
43
	$(RM) sanebuttonsd && rm sane-list-scanners && rm sane-nb-buttons
33
	$(RM) sanebuttonsd sane-list-scanners sane-nb-buttons
44
34
45
# replace hard coded paths in the .kmdr file with the defined PREFIX
35
# replace hard coded paths in the .kmdr file with the defined PREFIX
46
prefix:
36
prefix:
47
	perl -i.bak -pe 's@/usr/local/@$(PREFIX)@' KScannerButtons.kmdr
37
	perl -i.bak -pe 's@/usr/local/@$(PREFIX)@' KScannerButtons.kmdr
48
38
49
install: all prefix install_locales sanebuttonsd-test.sh sanebuttonsd.sh KScannerButtons.kmdr KScannerButtons.desktop kscannerbuttons.sh src/button_ok.png src/button_cancel.png
39
install: all prefix install_locales sanebuttonsd-test.sh sanebuttonsd.sh KScannerButtons.kmdr KScannerButtons.desktop kscannerbuttons.sh src/button_ok.png src/button_cancel.png
50
	$(INSTALLCMD)
40
	$(INSTALL) -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(DATADIR) $(DESTDIR)$(MENUDIR) \
41
		$(DESTDIR)$(ICONPATH) $(DESTDIR)$(LOCALEPATH)
42
43
	$(INSTALL) sanebuttonsd $(DESTDIR)$(BINDIR)
44
	$(INSTALL) sane-list-scanners $(DESTDIR)$(BINDIR)
45
	$(INSTALL) sane-nb-buttons $(DESTDIR)$(BINDIR)
46
	$(INSTALL) kscannerbuttons.sh $(DESTDIR)$(BINDIR)/kscannerbuttons
47
48
	$(INSTALL) sanebuttonsd-test.sh $(DESTDIR)$(DATADIR)
49
	$(INSTALL) sanebuttonsd.sh $(DESTDIR)$(DATADIR)
50
	$(INSTALL2) KScannerButtons.kmdr $(DESTDIR)$(DATADIR)
51
52
	$(INSTALL2) KScannerButtons.desktop $(DESTDIR)$(MENUDIR)
53
	$(INSTALL2) src/button_ok.png $(DESTDIR)$(ICONPATH)/KScannerButtons_ok.png
54
	$(INSTALL2) src/button_cancel.png $(DESTDIR)$(ICONPATH)/KScannerButtons_ko.png
51
55
52
# to create an icon on the Desktop
56
# to create an icon on the Desktop
53
userinstall: KScannerButtons.desktop
57
userinstall: KScannerButtons.desktop
Lines 81-96 Link Here
81
85
82
locales:
86
locales:
83
	# compile the i18n .po into a .mo file
87
	# compile the i18n .po into a .mo file
84
	for i in locale/* ; do \
88
	$(MAKE) -C locale
85
		if [ -d $$i ] && [ $$i != "." ] && [ $$i != ".." ]; then \
86
			make -C $$i ; \
87
		fi ; \
88
	done
89
89
90
install_locales: locales
90
install_locales: locales
91
	for i in locale/* ; do \
91
	$(MAKE) -C locale install
92
		if [ -d $$i ] && [ $$i != "." ] && [ $$i != ".." ]; then \
93
			make -C $$i install ; \
94
		fi ; \
95
	done
96
92
97
-- locale/cs/Makefile
93
.PHONY: all clean install install_locales locales i18n kdeinstall userinstall prefix
94
++ locale/cs/Makefile
Lines 1-7 Link Here
1
all: KScannerButtons.kmdr.po
1
include ../Makefile.subdir
2
	msgfmt KScannerButtons.kmdr.po -o KScannerButtons.mo
3
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
4
5
install: KScannerButtons.mo
6
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
7
8
-- locale/de/Makefile
2
++ locale/de/Makefile
Lines 1-7 Link Here
1
all: KScannerButtons.kmdr.po
1
include ../Makefile.subdir
2
	msgfmt KScannerButtons.kmdr.po -o KScannerButtons.mo
3
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
4
5
install: KScannerButtons.mo
6
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
7
8
-- locale/es/Makefile
2
++ locale/es/Makefile
Lines 1-7 Link Here
1
all: KScannerButtons.kmdr.po
1
include ../Makefile.subdir
2
	msgfmt KScannerButtons.kmdr.po -o KScannerButtons.mo
3
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
4
5
install: KScannerButtons.mo
6
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
7
8
-- locale/fr/Makefile
2
++ locale/fr/Makefile
Lines 1-7 Link Here
1
all: KScannerButtons.kmdr.po
1
include ../Makefile.subdir
2
	msgfmt KScannerButtons.kmdr.po -o KScannerButtons.mo
3
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
4
5
install: KScannerButtons.mo
6
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
7
8
-- locale/pt_BR/Makefile
2
++ locale/pt_BR/Makefile
Lines 1-7 Link Here
1
all: KScannerButtons.kmdr.po
1
include ../Makefile.subdir
2
	msgfmt KScannerButtons.kmdr.po -o KScannerButtons.mo
3
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
4
5
install: KScannerButtons.mo
6
	cp -f KScannerButtons.mo /usr/share/locale/`basename \`pwd\``/LC_MESSAGES/
7
8
-- locale/Makefile
2
++ locale/Makefile
Line 0 Link Here
0
-- locale/Makefile.subdir
1
SUBDIRS = $(patsubst %/Makefile,%,$(wildcard */Makefile))
2
3
all install: 
4
	set -e ; for d in $(SUBDIRS) ; do $(MAKE) -C $$d LANG=$$d $@ ; done
5
6
.PHONY: all install
7
++ locale/Makefile.subdir
Line 0 Link Here
1
LANG = $(notdir $(PWD))
2
DESTDIR =
3
LOCALEDIR = /usr/share/locale
4
5
all: KScannerButtons.mo
6
7
KScannerButtons.mo: KScannerButtons.kmdr.po
8
	msgfmt $^ -o $@
9
10
install: KScannerButtons.mo
11
	install -D -m 0644 KScannerButtons.mo $(DESTDIR)$(LOCALEDIR)/$(LANG)/LC_MESSAGES/KScannerButtons.mo
12
13
.PHONY: all install

Return to bug 160139