java-native.bbclass: remove do_stage function, because of NATIVE_INSTALL_WORKS =...
[openembedded.git] / recipes / gpe-autostarter / svn-build.patch
blobea1d67af6b32202b72f4dbd1b13919622898d3a6
1 diff -Naur detect-stylus.orig/build/Makefile.dpkg_ipkg detect-stylus/build/Makefile.dpkg_ipkg
2 --- detect-stylus.orig/build/Makefile.dpkg_ipkg 1970-01-01 02:00:00.000000000 +0200
3 +++ detect-stylus/build/Makefile.dpkg_ipkg 2007-02-10 17:21:40.154584782 +0200
4 @@ -0,0 +1,114 @@
5 +## Please read the README in this directory to see how to use this
6 +## Makefile snippet
8 +# Let's use whatever clean target the specific app provides
10 +CONTROL = `if test -e familiar/control1; then echo control1; else echo control; fi`
12 +# URL to source tarball
13 +SOURCE = http://gpe.linuxtogo.org/download/source/$(PACKAGE)-$(VERSION).tar.gz
15 +# can change this to e.g. /var/tmp/deb
16 +DEB_PATH = ../deb
18 +ifeq ($(CVSBUILD),yes)
19 +LIBGPEWIDGET_PC = libgpewidget-uninstalled
20 +PC_EXTRA=PKG_CONFIG_PATH=../../base/libgpewidget
21 +else
22 +LIBGPEWIDGET_PC = libgpewidget
23 +endif
25 +ifeq ($(IN_LIBGPEWIDGET),)
26 +GPECFLAGS = $(shell $(PC_EXTRA) pkg-config --cflags $(LIBGPEWIDGET_PC))
27 +GPELIBS = $(shell $(PC_EXTRA) pkg-config --libs $(LIBGPEWIDGET_PC))
28 +endif
30 +GTKCFLAGS = $(shell pkg-config --cflags gtk+-2.0)
31 +GTKLIBS = $(shell pkg-config --libs gtk+-2.0)
33 +STANDARD_CPPFLAGS = -D_GNU_SOURCE -DPACKAGE=\"$(PACKAGE)\" -DPREFIX=\"$(PREFIX)\" -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\"
34 +STANDARD_CFLAGS = -MD -Wall
36 +ifeq ($(DEBUG),yes)
37 +CFLAGS += -O2 -g
38 +LDFLAGS = -g
39 +else
40 +CFLAGS += -Os -fomit-frame-pointer
41 +endif
43 +dist: check-source clean dist-prep
44 + rm -rf ../$(PACKAGE)-$(VERSION)
45 + mkdir ../$(PACKAGE)-$(VERSION)
46 + ( tar cf - --exclude "*/CVS" --exclude CVS --exclude "*~" --exclude "#*#" --exclude "debian" --exclude ".*" --exclude "*.ipk" --exclude "*.ipk.*" --exclude "*.mo" --exclude "*.batch" --exclude "translation-ipkgs.txt" * ) | (cd ../$(PACKAGE)-$(VERSION); tar xf -)
47 + ( if [ -f linguas ]; then LINGUAS=`cat linguas`; PATCH_LINGUAS="s:^LINGUAS =.*:LINGUAS = $${LINGUAS}:"; fi; cd ../$(PACKAGE)-$(VERSION) && mkdir build && cp $(BUILD)/Makefile.dpkg_ipkg $(BUILD)/Makefile.translation build/ && sed "s:^CVSBUILD =.*:CVSBUILD = no:;s:^DEBUG =.*:DEBUG = no:;s:Makefile.translation-auto-linguas:Makefile.translation:;$${PATCH_LINGUAS}" < Makefile > Makefile.new && mv Makefile.new Makefile )
48 + ( cd .. ; tar cf - $(PACKAGE)-$(VERSION) | gzip -9 >$(PACKAGE)-$(VERSION).tar.gz )
49 + rm -rf ../$(PACKAGE)-$(VERSION)
50 + $(MAKE) printinfo
52 +dist-upload: dist
53 + scp ../$(PACKAGE)-$(VERSION).tar.gz $(USER)@linuxtogo.org:/media/data/projects/gpe/source/
55 +dist-prep:
56 +ipkg-prep:
57 +install-mo:
58 +# empty, can be filled in Makefile.translation
60 +install: install-program install-mo
62 +clean-dist:
63 + rm -rf familiar/dist familiar/dist.list
65 +clean: clean-dist
67 +check-source:
68 + @if [ -f familiar/$(CONTROL) ] && ! grep -q '^Source:' familiar/$(CONTROL); then echo -e "\nNo Source: field in control file. Aborting.\n"; exit 1; fi
70 +ipkg: check-source ipkg-prep clean
71 + rm -rf familiar/dist
72 + mkdir -p familiar/dist/CONTROL
73 + sed 's:VERSION:$(VERSION):;s$$SOURCE$$$(SOURCE)$$' < familiar/$(CONTROL) > familiar/dist/CONTROL/control
74 + if test -e familiar/conffiles; then install -m 644 familiar/conffiles familiar/dist/CONTROL; fi
75 + if test -e familiar/preinst; then install familiar/preinst familiar/dist/CONTROL; fi
76 + if test -e familiar/postinst; then install familiar/postinst familiar/dist/CONTROL; fi
77 + if test -e familiar/prerm; then install familiar/prerm familiar/dist/CONTROL; fi
78 + if test -e familiar/postrm; then install familiar/postrm familiar/dist/CONTROL; fi
79 + $(MAKE) DESTDIR=`pwd`/familiar/dist PREFIX=/usr prefix=/usr DEBUG=no install-program
80 + rm -rf familiar/dist.list
81 + ipkg-build -o 0 -g 0 familiar/dist | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> familiar/dist.list
82 + if [ "x$(LINGUAS)" != "x" ]; then make translation-ipkg; tr ' ' '\n' < translation-ipkgs.txt >> familiar/dist.list; fi
83 + md5sum `cat familiar/dist.list` > $(PACKAGE)_$(VERSION).batch
84 + rm -rf familiar/dist familiar/dist.list
85 + $(MAKE) printinfo
87 +dpkg: dist
88 + mkdir -p $(DEB_PATH)
89 + ( olddir=`pwd`; cd $(DEB_PATH); rm -rf $(PACKAGE)-$(VERSION); ln -s $$olddir/../$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)_$(VERSION).orig.tar.gz ; tar xzf $(PACKAGE)_$(VERSION).orig.tar.gz )
90 + mkdir -p $(DEB_PATH)/$(PACKAGE)-$(VERSION)/debian
91 + for i in debian/*; do if test -f $$i; then cp $$i $(DEB_PATH)/$(PACKAGE)-$(VERSION)/debian/; fi; done
93 +CVSTAG := $(shell echo $(PACKAGE)-$(VERSION) | tr [a-z.] [A-Z_])
94 +printinfo:
95 + @printf '-------------------------------------------------------------------------------\n'
96 + @printf "If this becomes a package release, please add a CVS tag.\n"
97 + @printf "You can use 'make tag' for that, it will execute\n"
98 + @printf " cvs tag %s\n" $(CVSTAG)
99 + @printf "Please upload a tarball (created with 'make dist') to\n"
100 + @printf " ftp://ftp.handhelds.org/pub/projects/gpe/\n"
101 + @printf " (handhelds.org:~ftp/pub/projects/gpe/source)\n"
102 + @printf "You can use 'make dist-upload' to do that.\n"
103 + @printf "You are currently known as USER %s.\n" $(USER)
104 + @printf '-------------------------------------------------------------------------------\n'
106 +tag: check-source
107 + cvs tag $(CVSTAG)
109 +retag: check-source
110 + cvs tag -F $(CVSTAG)
112 +source: tag dist-upload
114 +%.pc: %.pc.in
115 + sed 's:PREFIX:$(PREFIX):;s:BUILDDIR:$(shell pwd):;s:VERSION:$(VERSION):' < $< > $@
117 +.c.o:;
118 + $(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@
119 diff -Naur detect-stylus.orig/build/Makefile.translation detect-stylus/build/Makefile.translation
120 --- detect-stylus.orig/build/Makefile.translation 1970-01-01 02:00:00.000000000 +0200
121 +++ detect-stylus/build/Makefile.translation 2007-02-10 17:21:46.170927636 +0200
122 @@ -0,0 +1,107 @@
123 +.SUFFIXES: .mo .po .pot .po8
125 +CONTROL = `if test -e familiar/control1; then echo control1; else echo control; fi`
127 +# use ipkg-build or ipkg-deb-build
128 +IPKG_BUILD := ipkg-build
130 +TRANSLATION_SITE := http://www.iro.umontreal.ca/~gnutra/maint
132 +ifeq ($(DIR_PO),)
133 +DIR_PO := po
134 +endif
136 +ifeq ($(BINPACKAGE),)
137 +BINPACKAGE := $(PACKAGE)
138 +endif
140 +mo-files = $(patsubst %,$(DIR_PO)/%.mo,$(LINGUAS))
141 +po-files = $(patsubst %,$(DIR_PO)/%.po,$(LINGUAS))
143 +ifeq ($(shell if [ -f $(PACKAGE).desktop.in ]; then echo present; fi;),present)
144 +desktop-files += $(PACKAGE).desktop
145 +endif
147 +ifneq ($(EXTRA_DESKTOPS),)
148 +desktop-files += $(patsubst %.desktop.in,%.desktop,$(EXTRA_DESKTOPS))
149 +endif
151 +all-mo: $(mo-files)
153 +all-desktop: $(desktop-files)
155 +install-mo: all-mo
156 + if [ "$(ENABLE_NLS)" != "no" ]; then \
157 + if [ "x$(LINGUAS)" != "x" ]; then \
158 + for i in $(LINGUAS); do mkdir -p $(DESTDIR)$(PREFIX)/share/locale/$$i/LC_MESSAGES; install -m 644 $(DIR_PO)/$$i.mo $(DESTDIR)$(PREFIX)/share/locale/$$i/LC_MESSAGES/$(PACKAGE).mo; done \
159 + fi; \
160 + fi;
162 +.po8.mo:;
163 + if [ "$(ENABLE_NLS)" != "no" ]; then \
164 + msgfmt -o $@ $<; \
165 + fi;
167 +.po.po8:;
168 + CTYPE=`grep "^\"Content-Type:" $< | sed 's/^.*charset=//;s/\\\\.*//'`; sed "s/\(Content-Type: .*=\)$$CTYPE/\1UTF-8/" < $< | iconv -f $${CTYPE} -t UTF-8 >$@
170 +update-po: $(po-files) extract-po
172 +dist-prep: update-po freshen-po
173 +# empty
175 +ifeq ($(CVSBUILD),yes)
176 +ipkg-prep: freshen-po
177 +# empty
178 +endif
180 +extract-po:
181 + mkdir -p $(DIR_PO)
182 + ( SOURCES="$(SOURCES)"; for DESK in $(PACKAGE).desktop.in $(EXTRA_DESKTOPS); do if [ -f $$DESK ]; then intltool-extract --type=gettext/ini $$DESK; SOURCES="$$SOURCES $${DESK}.h"; fi; done; if [ "x$$SOURCES" != "x" ]; then xgettext --add-comments=TRANSLATORS: -k_ -kN_ -o $(DIR_PO)/$(PACKAGE).pot.new $$SOURCES; fi )
183 + if [ -f $(DIR_PO)/$(PACKAGE).pot.new ]; then if cmp -s $(DIR_PO)/$(PACKAGE).pot.new $(PACKAGE).pot; then rm $(DIR_PO)/$(PACKAGE).pot.new; else mv $(DIR_PO)/$(PACKAGE).pot.new $(DIR_PO)/$(PACKAGE).pot; fi; fi
185 +clean: clean-po clean-dist-translation
187 +clean-po:
188 + rm -rf $(DIR_PO)/*.mo
189 + for i in $(desktop-files); do if [ -f $$i.in ]; then rm -f $$i; rm -f $$i.in.h; fi; done
191 +%.desktop: %.desktop.in $(patsubst %,$(DIR_PO)/%.po,$(LINGUAS))
192 + intltool-merge -u -d $(DIR_PO) $< $@
194 +freshen-po:
195 + rm -rf tmp-po
196 + mkdir tmp-po
197 + cd tmp-po; for LANG in $(LINGUAS); do wget $(TRANSLATION_SITE)/$(PACKAGE)/$$LANG.po; done
198 + for LANG in $(LINGUAS); do if [ ! -f $(DIR_PO)/$$LANG.po ] || ! cmp -s $(DIR_PO)/$$LANG.po tmp-po/$$LANG.po ; then mv tmp-po/$$LANG.po $(DIR_PO)/$$LANG.po; echo "Updated $$LANG translation"; fi; done
199 + rm -rf tmp-po
201 +# ------------------------------------------------------------------------
203 +MAINTAINER = $(shell grep 'Maintainer: ' familiar/$(CONTROL) | cut -d ' ' -f 2-)
205 +ifndef BUILD
206 +BUILD = ../build
207 +endif
209 +transdist := familiar/dist-translation
210 +templates := $(BUILD)/familiar
211 +ipkglist := translation-ipkgs.txt
213 +clean-dist-translation:
214 + rm -rf $(transdist) $(ipkglist)
216 +real-translation-package: all-mo
217 + rm -rf $(transdist) $(ipkglist)
218 + for LINGUA in $(LINGUAS); do \
219 + i=$$(echo $$LINGUA | tr '[A-Z_]' '[a-z+]'); \
220 + mkdir -p $(transdist)/$$i/CONTROL; \
221 + mkdir -p $(transdist)/$$i$(PREFIX)/share/locale/$$LINGUA/LC_MESSAGES; \
222 + install -m 644 po/$$LINGUA.mo $(transdist)/$$i$(PREFIX)/share/locale/$$LINGUA/LC_MESSAGES/$(PACKAGE).mo; \
223 + sed -e "s/<maintainer>/$(MAINTAINER)/;s/<package>/$(BINPACKAGE)/;s/<version>/$(VERSION)/;s/<language>/$$i/;s!<source>!$(SOURCE)!" $(templates)/control.translation > $(transdist)/$$i/CONTROL/control; \
224 + install $(templates)/postinst.translation $(transdist)/$$i/CONTROL/postinst; \
225 + $(IPKG_BUILD) -g 0 -o 0 $(transdist)/$$i | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> $(ipkglist); \
226 + done
228 +translation-ipkg:
229 + make PREFIX=/usr real-translation-package