Tags: patch Hi,
here's an improved version of the earlier patch that conditionally checks for contents of DEB_BUILD_OPTIONS as per policy. Is there some way to avoid having to patch upstream clients/gsat-1.1.0/plugins/Makefile ?
Fri Dec 21 13:47:11 EET 2007 [EMAIL PROTECTED] * add support for DEBUG_BUILD_OPTIONS="nostrip debug noopt" diff -rN -u old-predict-2.2.3/clients/gsat-1.1.0/plugins/Makefile new-predict-2.2.3/clients/gsat-1.1.0/plugins/Makefile --- old-predict-2.2.3/clients/gsat-1.1.0/plugins/Makefile 2007-12-21 13:55:40.000000000 +0200 +++ new-predict-2.2.3/clients/gsat-1.1.0/plugins/Makefile 2007-12-21 13:55:40.000000000 +0200 @@ -11,13 +11,13 @@ all: $(TARGETS) radio_FT736: - gcc -fPIC -shared radio_FT736.c -o radio_FT736 + gcc -fPIC -shared radio_FT736.c -o radio_FT736 $(CFLAGS) radio_FT847: radio_FT847.c - gcc -Wall -fPIC -shared radio_FT847.c -o radio_FT847 + gcc -Wall -fPIC -shared radio_FT847.c -o radio_FT847 $(CFLAGS) radio_ICR10: - gcc -fPIC -shared radio_ICR10.c -o radio_ICR10 + gcc -fPIC -shared radio_ICR10.c -o radio_ICR10 $(CFLAGS) radio_TMD700: # gcc -fPIC -shared radio_TMD700.c -o radio_TMD700 -lm -lD700 @@ -26,16 +26,16 @@ # gcc -fPIC -shared radio_PCR100.c -o radio_PCR100 -lpcr100 radio_print: - gcc -fPIC -shared radio_print.c -o radio_print + gcc -fPIC -shared radio_print.c -o radio_print $(CFLAGS) radio_test: - gcc -fPIC -shared radio_test.c -o radio_test + gcc -fPIC -shared radio_test.c -o radio_test $(CFLAGS) rotor_print: - gcc -fPIC -shared rotor_print.c -o rotor_print + gcc -fPIC -shared rotor_print.c -o rotor_print $(CFLAGS) rotor_pictrack: - gcc -fPIC -shared rotor_pictrack.c -o rotor_pictrack + gcc -fPIC -shared rotor_pictrack.c -o rotor_pictrack $(CFLAGS) clean: rm -f *.o *~ $(TARGETS) diff -rN -u old-predict-2.2.3/debian/rules new-predict-2.2.3/debian/rules --- old-predict-2.2.3/debian/rules 2007-12-21 13:55:40.000000000 +0200 +++ new-predict-2.2.3/debian/rules 2007-12-21 13:55:40.000000000 +0200 @@ -8,28 +8,36 @@ # This is the debhelper compatability version to use. export DH_COMPAT=4 +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 -fomit-frame-pointer +endif + build: build-stamp build-stamp: dh_testdir - cc -Wall -O2 -s -fomit-frame-pointer \ + cc $(CFLAGS) \ -I/usr/include/ncurses predict.c -lm -lncurses -lpthread \ -o predict - cc -Wall -O2 -s -fomit-frame-pointer \ + cc $(CFLAGS) \ -I/usr/include/ncurses predict-g1yyh.c -lm -lncurses \ -lpthread -lmenu -o predict-g1yyh - cc -Wall -O2 -s -fomit-frame-pointer \ + cc $(CFLAGS) \ vocalizer/vocalizer.c -o vocalizer/vocalizer - (cd utils/fodtrack-0.1 ; cc -Wall -O6 -s -lm fodtrack.c -o fodtrack ) - (cd utils/geosat ; cc -Wall -O6 -s -lm geosat.c -o geosat ) - (cd utils/moontracker ; cc -Wall -O6 -s -lm moontracker.c -o moontracker ) - (cd clients/earthtrack ; cc -Wall -O6 -s -lm earthtrack.c -o earthtrack ) - (cd clients/map; cc -Wall -O3 -s -o predict-map map.c map_cb.c map_main.c -I/usr/include/X11 -lforms -lX11 -lm) - (cd clients/gsat-1.1.0 ; ./configure --prefix=/usr ; make ) - (cd clients/gsat-1.1.0/plugins ; make ) + (cd utils/fodtrack-0.1 ; cc $(CFLAGS) -lm fodtrack.c -o fodtrack ) + (cd utils/geosat ; cc $(CFLAGS) -lm geosat.c -o geosat ) + (cd utils/moontracker ; cc $(CFLAGS) -lm moontracker.c -o moontracker ) + (cd clients/earthtrack ; cc $(CFLAGS) -lm earthtrack.c -o earthtrack ) + (cd clients/map; cc $(CFLAGS) -o predict-map map.c map_cb.c map_main.c -I/usr/include/X11 -lforms -lX11 -lm) + (cd clients/gsat-1.1.0 ; CFLAGS="$(CFLAGS)" ./configure --prefix=/usr ; make ) + (cd clients/gsat-1.1.0/plugins ; CFLAGS="$(CFLAGS)" make ) (cd clients/kep_reload ; \ - cc -Wall -O3 -s -fomit-frame-pointer kep_reload.c -o kep_reload ) + cc $(CFLAGS) kep_reload.c -o kep_reload ) touch build-stamp
best regards, Timo Lindfors