[Exim] Patch to allow stripping of binaries

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Sheldon Hearn
日付:  
To: Philip Hazel
CC: exim-users
題目: [Exim] Patch to allow stripping of binaries
Hi Philip,

The following patches were required to strip the Exim binaries prior to
installation under FreeBSD.

Other systems that include strip(1) in the base system would probably
want their OS-specific Makefile adjusted as well.

Ciao,
Sheldon.

--- OS/Makefile-Base.orig    Mon Jun 11 11:52:54 2001
+++ OS/Makefile-Base    Mon Jun 11 12:04:56 2001
@@ -216,6 +216,9 @@
       auths/auths.a \
       $(LIBS) $(LIBS_EXIM) $(IPV6_LIBS) $(EXTRALIBS) $(EXTRALIBS_EXIM) \
       $(DBMLIB) $(LIBRESOLV) $(LOOKUP_LIBS) $(PERL_LIBS) $(TLS_LIBS)
+    if [ x"$(STRIP_COMMAND)" != x"" ]; then \
+      $(STRIP_COMMAND) exim; \
+    fi
     $(EXIM_CHMOD)
     @echo " "
     @echo ">>> exim binary built"
@@ -228,6 +231,9 @@
 exim_fixdb:  $(OBJ_FIXDB)
     $(CC) $(CFLAGS) $(INCLUDE) -o exim_fixdb $(LFLAGS) $(OBJ_FIXDB) \
       $(LIBS) $(EXTRALIBS) $(DBMLIB)
+    if [ x"$(STRIP_COMMAND)" != x"" ]; then \
+      $(STRIP_COMMAND) exim_fixdb; \
+    fi
     @echo " "
     @echo ">>> exim_fixdb utility built"
     @echo " "
@@ -239,6 +245,9 @@
 exim_dumpdb: $(OBJ_DUMPDB)
     $(CC) $(CFLAGS) $(INCLUDE) -o exim_dumpdb $(LFLAGS) $(OBJ_DUMPDB) \
       $(LIBS) $(EXTRALIBS) $(DBMLIB)
+    if [ x"$(STRIP_COMMAND)" != x"" ]; then \
+      $(STRIP_COMMAND) exim_dumpdb; \
+    fi
     @echo " "
     @echo ">>> exim_dumpdb utility built"
     @echo " "
@@ -250,6 +259,9 @@
 exim_tidydb: $(OBJ_TIDYDB)
     $(CC) $(CFLAGS) $(INCLUDE) -o exim_tidydb $(LFLAGS) $(OBJ_TIDYDB) \
       $(LIBS) $(EXTRALIBS) $(DBMLIB)
+    if [ x"$(STRIP_COMMAND)" != x"" ]; then \
+      $(STRIP_COMMAND) exim_tidydb; \
+    fi
     @echo " "
     @echo ">>> exim_tidydb utility built"
     @echo " "
@@ -259,6 +271,9 @@
 exim_dbmbuild: exim_dbmbuild.c config.h
     $(CC) $(CFLAGS) $(INCLUDE) -o exim_dbmbuild $(LFLAGS) exim_dbmbuild.c \
       $(LIBS) $(EXTRALIBS) $(DBMLIB)
+    if [ x"$(STRIP_COMMAND)" != x"" ]; then \
+      $(STRIP_COMMAND) exim_dbmbuild; \
+    fi
     @echo " "
     @echo ">>> exim_dbmbuild utility built"
     @echo " "
@@ -268,6 +283,9 @@
 exim_lock: exim_lock.c
     $(CC) $(CFLAGS) $(INCLUDE) -o exim_lock $(LFLAGS) exim_lock.c  \
       $(LIBS) $(EXTRALIBS)
+    if [ x"$(STRIP_COMMAND)" != x"" ]; then \
+      $(STRIP_COMMAND) exim_lock; \
+    fi
     @echo " "
     @echo ">>> exim_lock utility built"
     @echo " "
@@ -290,6 +308,9 @@
     $(PURIFY) $(CC) -o eximon.bin em_version.o $(LFLAGS) $(XLFLAGS) \
     $(OBJ_MONBIN) -lXaw -lXmu -lXt -lXext -lX11 pcre/libpcre.a \
       $(LIBS) $(LIBS_EXIMON) $(EXTRALIBS) $(EXTRALIBS_EXIMON) -lc
+    if [ x"$(STRIP_COMMAND)" != x"" ]; then \
+      $(STRIP_COMMAND) eximon.bin; \
+    fi
     @echo " "
     @echo ">>> exim monitor binary built"
     @echo " "
--- OS/Makefile-FreeBSD.orig    Mon Jun 11 12:04:05 2001
+++ OS/Makefile-FreeBSD    Mon Jun 11 12:04:33 2001
@@ -5,6 +5,7 @@
 PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout


CHOWN_COMMAND=/usr/sbin/chown
+STRIP_COMMAND=/usr/bin/strip

HAVE_SA_LEN=YES