]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/gpe-today/gpe-today-0.08/gpe-today_makefiles.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / gpe-today / gpe-today-0.08 / gpe-today_makefiles.patch
1 diff -urNd ../gpe-today-0.08-r0.orig/gpe-today-0.08/Makefile gpe-today-0.08/Makefile
2 --- ../gpe-today-0.08-r0.orig/gpe-today-0.08/Makefile   2003-11-27 20:25:07.000000000 +0000
3 +++ gpe-today-0.08/Makefile     2004-06-22 04:30:22.722392968 +0000
4 @@ -1,32 +1,20 @@
5  PACKAGE = gpe-today
6  PREFIX = /usr/local
7 -VERSION = 0.08
8 +DEBUG = no
9  CVSBUILD = no
10 -#DEBUG = yes
11 -#EFENCE = yes
12 -LINGUAS = pt de zh_TW ga ro wa fr sv nl cs sk ru
13 -
14 -MEMBERS = main todo calendar date xsettings
15 -
16 -GTKCFLAGS = `pkg-config --cflags gtk+-2.0`
17 -GTKLDFLAGS += `pkg-config --libs gtk+-2.0`
18 -
19 -CPPFLAGS = -I../libgpewidget -I../libeventdb -I../libtododb -I../libxsettings -I../libxsettings-client -D_GNU_SOURCE
20 +VERSION = 0.08
21  
22 -ifeq ($(EFENCE),yes)
23 -LDFLAGS = -lefence
24 -endif
25 +LINGUAS = pt de zh_TW ga ro wa fr sv nl cs sk ru
26  
27 -ifeq ($(DEBUG),yes)
28 -CFLAGS = -g
29 -else
30 -CFLAGS = -Os -fomit-frame-pointer
31 +ifeq ($(CVSBUILD),yes)
32 +PACKAGE_CPPFLAGS += -I../libeventdb -I../libtododb -I../libxsettings -I../libxsettings-client -I../libdisplaymigration -I../libgpepimc
33 +PACKAGE_LDFLAGS += -L../libeventdb -L../libtododb -L../libxsettings-client -Wl,-rpath-link,../libxsettings -L../libgpepimc
34  endif
35 +PACKAGE_CPPFLAGS += $(STANDARD_CPPFLAGS)
36 +PACKAGE_CFLAGS += $(STANDARD_CFLAGS) $(GPECFLAGS)
37 +PACKAGE_LDFLAGS += $(STANDARD_LDFLAGS) $(GPELIBS) -leventdb -ltododb -lXsettings-client -ldisplaymigration -lsqlite -lgpepimc
38  
39 -CFLAGS += -Wall $(GTKCFLAGS)
40 -LDFLAGS += $(GTKLDFLAGS) -L/usr/local/lib -L../libeventdb -leventdb -L../libtododb -ltododb -L../libxsettings -L../libxsettings-client -lXsettings-client -Wl,-rpath-link,../libxsettings 
41 -CPPFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DPREFIX=\"$(PREFIX)\" -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\"
42 -#CFLAGS += -MD
43 +MEMBERS = main todo calendar date xsettings
44  
45  .SUFFIXES: .d
46  
47 @@ -42,10 +30,10 @@
48  BUILD = build
49  endif
50  
51 -all: $(PACKAGE) all-mo
52 +all: $(PACKAGE)
53  
54  $(PACKAGE): $(OBJS)
55 -       $(CC) -o $@ $^ -L../libgpewidget -lgpewidget -lsqlite $(LDFLAGS)
56 +       $(CC) -o $@ $^ $(LDFLAGS) $(PACKAGE_LDFLAGS)
57  
58  install-program: all $(PACKAGE).desktop
59         for i in $(PIXMAPS); do install -D -m 644 pixmaps/$$i $(DESTDIR)$(PREFIX)/share/$(PACKAGE)/pixmaps/$$i; done
60 diff -urNd ../gpe-today-0.08-r0.orig/gpe-today-0.08/build/Makefile.dpkg_ipkg gpe-today-0.08/build/Makefile.dpkg_ipkg
61 --- ../gpe-today-0.08-r0.orig/gpe-today-0.08/build/Makefile.dpkg_ipkg   2003-11-27 20:25:07.000000000 +0000
62 +++ gpe-today-0.08/build/Makefile.dpkg_ipkg     2004-06-22 04:20:51.000000000 +0000
63 @@ -18,8 +18,10 @@
64  LIBGPEWIDGET_PC = libgpewidget
65  endif
66  
67 +ifeq ($(IN_LIBGPEWIDGET),)
68  GPECFLAGS = $(shell $(PC_EXTRA) pkg-config --cflags $(LIBGPEWIDGET_PC))
69  GPELIBS = $(shell $(PC_EXTRA) pkg-config --libs $(LIBGPEWIDGET_PC))
70 +endif
71  
72  GTKCFLAGS = $(shell pkg-config --cflags gtk+-2.0)
73  GTKLIBS = $(shell pkg-config --libs gtk+-2.0)
74 @@ -28,16 +30,16 @@
75  STANDARD_CFLAGS = -MD -Wall
76  
77  ifeq ($(DEBUG),yes)
78 -STANDARD_CFLAGS += -O2 -g
79 -STANDARD_LDFLAGS = -g
80 +CFLAGS += -O2 -g
81 +LDFLAGS = -g
82  else
83 -STANDARD_CFLAGS += -Os -fomit-frame-pointer
84 +CFLAGS += -Os -fomit-frame-pointer
85  endif
86  
87  dist: check-source clean dist-prep
88         rm -rf ../$(PACKAGE)-$(VERSION)
89         mkdir ../$(PACKAGE)-$(VERSION)
90 -       ( tar cf - --exclude "*/CVS" --exclude CVS --exclude "*~" --exclude "#*#" --exclude "debian" --exclude ".*" --exclude "*.ipk" --exclude "*.ipk.*" --exclude "*.mo" --exclude "*.d" --exclude "*.batch" --exclude "translation-ipkgs.txt" * ) | (cd ../$(PACKAGE)-$(VERSION); tar xf -)
91 +       ( 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 -)
92         ( cd ../$(PACKAGE)-$(VERSION); mkdir build; cp $(BUILD)/Makefile.dpkg_ipkg $(BUILD)/Makefile.translation build/ ; sed 's:^CVSBUILD.*:CVSBUILD = no:' < Makefile > Makefile.new; mv Makefile.new Makefile )
93         ( cd .. ; tar cf - $(PACKAGE)-$(VERSION) | gzip -9 >$(PACKAGE)-$(VERSION).tar.gz )
94         rm -rf ../$(PACKAGE)-$(VERSION)
95 @@ -53,8 +55,13 @@
96  
97  install: install-program install-mo
98  
99 +clean-dist:
100 +       rm -rf familiar/dist familiar/dist.list
101 +
102 +clean: clean-dist
103 +
104  check-source:
105 -       @if ! grep -q '^Source:' familiar/$(CONTROL); then echo -e "\nNo Source: field in control file.  Aborting.\n"; exit 1; fi
106 +       @if [ -e familiar ] && ! grep -q '^Source:' familiar/$(CONTROL); then echo -e "\nNo Source: field in control file.  Aborting.\n"; exit 1; fi
107  
108  ipkg: check-source ipkg-prep clean
109         rm -rf familiar/dist
110 @@ -68,9 +75,9 @@
111         $(MAKE) DESTDIR=`pwd`/familiar/dist PREFIX=/usr prefix=/usr DEBUG=no install-program
112         rm -rf familiar/dist.list
113         ipkg-build -o 0 -g 0 familiar/dist | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> familiar/dist.list
114 -       rm -f 
115         if [ "x$(LINGUAS)" != "x" ]; then make translation-ipkg; tr ' ' '\n' < translation-ipkgs.txt >> familiar/dist.list; fi
116         md5sum `cat familiar/dist.list` > $(PACKAGE)_$(VERSION).batch
117 +       rm -rf familiar/dist familiar/dist.list
118         $(MAKE) printinfo
119  
120  dpkg: dist
121 @@ -89,6 +96,7 @@
122         @printf "   ftp://ftp.handhelds.org/pub/projects/gpe/\n"
123         @printf "   (handhelds.org:~ftp/pub/projects/gpe/source)\n"
124         @printf "You can use 'make dist-upload' to do that.\n"
125 +       @printf "You are currently known as USER %s.\n" $(USER)
126         @printf '-------------------------------------------------------------------------------\n'
127  
128  tag: check-source
129 @@ -101,3 +109,6 @@
130  
131  %.pc: %.pc.in
132         sed 's:PREFIX:$(PREFIX):;s:BUILDDIR:$(shell pwd):;s:VERSION:$(VERSION):' < $< > $@
133 +
134 +.c.o:;
135 +       $(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@
136 diff -urNd ../gpe-today-0.08-r0.orig/gpe-today-0.08/build/Makefile.translation gpe-today-0.08/build/Makefile.translation
137 --- ../gpe-today-0.08-r0.orig/gpe-today-0.08/build/Makefile.translation 2003-11-27 20:25:07.000000000 +0000
138 +++ gpe-today-0.08/build/Makefile.translation   2004-06-22 04:20:51.000000000 +0000
139 @@ -5,7 +5,7 @@
140  # use ipkg-build or ipkg-deb-build
141  IPKG_BUILD := ipkg-build
142  
143 -TRANSLATION_SITE := http://www.iro.umontreal.ca/~gnutra/maint/
144 +TRANSLATION_SITE := http://www.iro.umontreal.ca/~gnutra/maint
145  
146  ifeq ($(DIR_PO),)
147  DIR_PO := po
148 @@ -56,7 +56,7 @@
149         ( 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 )
150         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
151  
152 -clean: clean-po
153 +clean: clean-po clean-dist-translation
154  
155  clean-po:
156         rm -rf $(DIR_PO)/*.mo
157 @@ -76,10 +76,17 @@
158  
159  MAINTAINER = $(shell grep 'Maintainer: ' familiar/$(CONTROL) | cut -d ' ' -f 2-)
160  
161 +ifndef BUILD
162 +BUILD = ../build
163 +endif
164 +
165  transdist := familiar/dist-translation
166 -templates := ../build/familiar
167 +templates := $(BUILD)/familiar
168  ipkglist  := translation-ipkgs.txt
169  
170 +clean-dist-translation:
171 +       rm -rf $(transdist) $(ipkglist)
172 +
173  real-translation-package: all-mo
174         rm -rf $(transdist) $(ipkglist)
175         for LINGUA in $(LINGUAS); do \
176 @@ -89,8 +96,7 @@
177                 install -m 644 po/$$LINGUA.mo $(transdist)/$$i$(PREFIX)/share/locale/$$LINGUA/LC_MESSAGES/$(PACKAGE).mo; \
178                 sed -e "s/<maintainer>/$(MAINTAINER)/;s/<package>/$(BINPACKAGE)/;s/<version>/$(VERSION)/;s/<language>/$$i/;s!<source>!$(SOURCE)!" $(templates)/control.translation > $(transdist)/$$i/CONTROL/control; \
179                 install $(templates)/postinst.translation $(transdist)/$$i/CONTROL/postinst; \
180 -               chown -R root.root $(transdist)/$$i; \
181 -               $(IPKG_BUILD) $(transdist)/$$i | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> $(ipkglist); \
182 +               $(IPKG_BUILD) -g 0 -o 0 $(transdist)/$$i | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> $(ipkglist); \
183         done
184  
185  translation-ipkg: