1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
|
SHELL=/bin/sh
.SUFFIXES: .c .0
############################################################################
# History File Configuration Stuff
############################################################################
# Step 1: Define ONE of the CHKHISTORY
CHKHISTORY=@HISTORY@
#CHKHISTORY=chkhistory.o # use flat file history routine
#CHKHISTORY=chkhistory_db.o # use DB history routine, if you use
# DBM, GDBM, NDBM, or DBZ
# in order to use DBZ with INN you will need
# the full compiled source code, especially
# inn/lib/libinn.so & inn/include/dbz.h
#CHKHISTORY="chkhistory_multi.o chkhistory_other.o chkhistory_cnews.o chkhistory_inn.o"
# determine history type at runtime
# If you are using flat file, you can skip the rest, they don't matter
# Step 2: Define ONE of the Database Types
DB_TYPE=@DB_TYPE@
#DB_TYPE=-DUSE_DBM
#DB_TYPE=-DUSE_GDBM
#DB_TYPE=-DUSE_NDBM
#DB_TYPE=-DUSE_DBZ # for inn-1.X.X users
#DB_TYPE=-DUSE_INN2 # for inn-2.1-2.2 users
#DB_TYPE=-DUSE_INN23 # for inn-2.3.X users
# Step 3: Define ONE Library that contains the functions
# If you are using INN-2.X, and the compiler complains
# about Undefined Symbols QIOclose QIOopen QIOread
# Use the DB_LIB that includes -lstorage
DB_LIB=@DB_LIB@
#DB_LIB=-ldbm
#DB_LIB=-lgdbm
#DB_LIB=-lndbm
#DB_LIB=-ldbz
#DB_LIB=-linn -lstorage # see note above
#DB_LIB=-linn # INN puts DBZ code in here
#DB_LIB=-linn -lcnews # only ok with hacked cnews lib and USE_MULTI
# Step 4: IF your DB Library/Includes are in a non-standard place,
# define These
#DB_INC_LOC=-I/usr/src/inn-2.3.4/include
#DB_LIB_LOC=-L/usr/src/inn-2.3.4/lib
DB_INC_LOC=-I/usr/include/inn -I.
DB_LIB_LOC=-L/usr/lib/news -L.
# Step 5: If you want to use embedded PERL functions as kill routines
# define these.
# PERL_CORE needs to point to where perl.h and libperl.a lives.
# PERL_DEFS might need to be changed, depending on how you compiled
# your perl. These defaults should be good for most people.
# If you get errors about missing libs, add em to the PERL_LIB define.
# If your compile fails with refs to missing symbols like pow() and floor(),
# add -lm to the PERL_LIB line.
# The rest of these should be left alone (except to remove the #).
# If you're using perl5.004 or older, add "-DOLD_PERL to PERL_DEFS
PERL_LIB=@PERL_LIB@
PERL_DEFS=@PERL_DEFS@
PERL_INC_LOC=@PERL_INC_LOC@
PERL_LIB_LOC=@PERL_LIB_LOC@
#PERL_CORE=/usr/lib/perl5/5.8.0/i386-linux-thread-mult/CORE
#PERL_LIB=-lperl -lcrypt
#PERL_DEFS=-D_REENTRANT -D_GNU_SOURCE
#PERL_INC_LOC=-I$(PERL_CORE)
#PERL_LIB_LOC=-L$(PERL_CORE)
# Step 6: If compiling for OS/2 uncomment the following
#OS2_LD=-Zexe
#OS2_DEFS=-DEMX
# Step 7: If compiling with SSL uncomment the following
SSL_LIB=@SSL_LIB@
SSL_DEFS=@SSL_DEFS@
#SSL_LIB=-lssl -lcrypto
#SSL_DEFS=-I/usr/local/ssl/include -DHAVE_LIBSSL
#SSL_LIB_LOC=-L/usr/local/ssl/lib
############################################################################
# COMPILE flags for GCC
############################################################################
GCC_FLAGS=
DBZ_GCC_FLAGS=
############################################################################
# YOU SHOULD NOT NEED TO TOUCH BELOW HERE
############################################################################
# my compile stuff
############################################################################
MY_GCC_FLAGS = -Wall -Wpointer-arith -Wcast-align -Wcast-qual \
-Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs \
-Wstrict-prototypes -Wwrite-strings -Wmissing-declarations
MY_DBZ_GCC_FLAGS = -Wall -Wpointer-arith -Wcast-align -Wcast-qual \
-Waggregate-return -Wmissing-prototypes -Wnested-externs -Wwrite-strings \
-Wmissing-declarations
############################################################################
#GCC_FLAGS= $(MY_GCC_FLAGS)
#DBZ_GCC_FLAGS= $(MY_DBZ_GCC_FLAGS)
##############################################################################
# Ultrix 2.2 make doesn't expand the value of VPATH.
VPATH = @srcdir@
# This must repeat the value, because configure will remove `VPATH = .'.
srcdir = @srcdir@
# Suck Makefile
PKGNAME=suck
VERSION_MAJOR=4
VERSION_MINOR=3
VERSION_PATCH=2.1
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
CC = @CC@
@SET_MAKE@
CFLAGS = @CFLAGS@
CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@ $(DB_TYPE)
LDFLAGS = @LDFLAGS@ $(DMALLOC_LD) $(OS2_LD)
DEFS = @DEFS@ -DSUCK_VERSION=\"$(VERSION)\" $(DMALLOC_DEFS) $(OS2_DEFS) $(DMALLOC_INC)
LIBS = @LIBS@ $(DMALLOC_LIB)
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
manext = 1
mandir = @mandir@/man$(manext)
srcdir = @srcdir@
MAN = $(srcdir)/man
SMAN= $(srcdir)/Spanish.docs
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
SPECVERSION = `sed -n 's/^%define version //p' suck.spec`
#List of .o files suck needs to compile:
suckobjs = both.o both_phrases.o suck.o suckutils.o killfile.o timer.o killprg.o \
dedupe.o suck_phrases.o active.o batch.o xover.o ssort.o $(CHKHISTORY) \
db.o
rpostobjs = both.o both_phrases.o rpost.o rpost_phrases.o
testhobjs = both.o both_phrases.o testhost.o test_phrases.o
makepobjs = makephrases.o suck_phrases.o rpost_phrases.o test_phrases.o \
both_phrases.o lmove_phrases.o
lmoveobjs = both.o both_phrases.o lmove.o lmove_phrases.o
all: phrases.h suck rpost testhost lmove
@echo make done
suck: phrases.h $(suckobjs)
$(CC) $(LDFLAGS) $(DB_LIB_LOC) $(PERL_LIB_LOC) $(SSL_LIB_LOC) -o suck $(suckobjs) $(LIBS) $(DB_LIB) $(PERL_LIB) $(SSL_LIB)
lmove: phrases.h $(lmoveobjs)
$(CC) $(LDFLAGS) $(SSL_LIB_LOC) -o lmove $(lmoveobjs) $(LIBS) $(SSL_LIB)
lpost: lpost.o
$(CC) $(LDFLAGS) -o lpost lpost.o $(LIBS)
readdb: phrases.h read_db.o
$(CC) $(LDFLAGS) -o read_db read_db.o $(LIBS)
rpost: phrases.h $(rpostobjs)
$(CC) $(LDFLAGS) $(PERL_LIB_LOC) $(SSL_LIB_LOC) -o rpost $(rpostobjs) $(LIBS) $(PERL_LIB) $(SSL_LIB)
testhost: phrases.h $(testhobjs)
$(CC) $(LDFLAGS) $(SSL_LIB_LOC) -o testhost $(testhobjs) $(LIBS) $(SSL_LIB)
makephrases: $(makepobjs)
$(CC) $(LDFLAGS) -o makephrases $(makepobjs) $(LIBS)
phrases: makephrases
./makephrases phrases.engl
phrases.h: makephrases
./makephrases phrases.h
install: install_bin install_man
#install_Spanish: install_bin install_sman
install_bin: suck rpost testhost lmove
# - mkdir -p $(bindir)
# - strip -s suck rpost testhost lmove
$(INSTALL_PROGRAM) suck $(bindir)/suck
$(INSTALL_PROGRAM) rpost $(bindir)/rpost
$(INSTALL_PROGRAM) testhost $(bindir)/testhost
$(INSTALL_PROGRAM) lmove $(bindir)/lmove
install_man: $(MAN)/suck.1 $(MAN)/rpost.1 $(MAN)/testhost.1 $(MAN)/lmove.1
- mkdir -p $(mandir)
- rm -f $(mandir)/lpost.$(manext)
$(INSTALL_DATA) $(MAN)/suck.1 $(mandir)/suck.$(manext)
$(INSTALL_DATA) $(MAN)/rpost.1 $(mandir)/rpost.$(manext)
$(INSTALL_DATA) $(MAN)/testhost.1 $(mandir)/testhost.$(manext)
$(INSTALL_DATA) $(MAN)/lmove.1 $(mandir)/lmove.$(manext)
#install_sman: $(SMAN)/suck.1 $(SMAN)/rpost.1 $(SMAN)/testhost.1 $(SMAN)/lpost.1
# $(MAKE) -C $(SMAN)
install_lpost: lpost $(MAN)/lpost.1
# - strip -s lpost
$(INSTALL_PROGRAM) lpost $(bindir)/lpost
$(INSTALL_DATA) $(MAN)/lpost.1 $(mandir)/lpost.$(manext)
installall: install install_lpost
clean:
rm -f `find . \( -name "*.o" -o -name "*[~%]" \) -print`
chkhistory_db.o: chkhistory_db.c
$(CC) -c $(DB_INC_LOC) $(CFLAGS) $(DBZ_GCC_FLAGS) $(CPPFLAGS) $(DEFS) $<
chkhistory_multi.o: chkhistory_multi.c
$(CC) -c $(DB_INC_LOC) $(CFLAGS) $(DBZ_GCC_FLAGS) $(CPPFLAGS) $(DEFS) $<
chkhistory_other.o: chkhistory.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -Dchkhistory=chkhistory_other -o chkhistory_other.o chkhistory.c
chkhistory_inn.o: chkhistory_db.c
$(CC) -c $(DB_INC_LOC) $(CFLAGS) -I/usr/include/inn $(DBZ_GCC_FLAGS) $(CPPFLAGS) $(DEFS) -DUSE_INN23 -Dchkhistory=chkhistory_inn -o chkhistory_inn.o chkhistory_db.c
chkhistory_cnews.o: chkhistory_db.c
$(CC) -c -Ilibdbz $(CFLAGS) $(CPPFLAGS) $(DEFS) -DUSE_DBZ -Dchkhistory=chkhistory_cnews -Ddbminit=cn_dbzdbminit -Ddbmclose=cn_dbzdbmclose -include cndbz.h -o chkhistory_cnews.o chkhistory_db.c
killfile.o: killfile.c
$(CC) -c $(CFLAGS) $(DBZ_GCC_FLAGS) $(CPPFLAGS) $(DEFS) $(PERL_DEFS) $(PERL_INC_LOC) $<
killprg.o: killprg.c
$(CC) -c $(CFLAGS) $(DBZ_GCC_FLAGS) $(CPPFLAGS) $(DEFS) $(PERL_DEFS) $(PERL_INC_LOC) $<
xover.o: xover.c
$(CC) -c $(CFLAGS) $(DBZ_GCC_FLAGS) $(CPPFLAGS) $(DEFS) $(PERL_DEFS) $(PERL_INC_LOC) $<
rpost.o: rpost.c
$(CC) -c $(CFLAGS) $(DBZ_GCC_FLAGS) $(CPPFLAGS) $(DEFS) $(PERL_DEFS) $(PERL_INC_LOC) $<
.c.o:
$(CC) -c $(CFLAGS) $(SSL_DEFS) $(GCC_FLAGS) $(CPPFLAGS) $(DEFS) $<
#---------------------------------------------------------------------------
# stuff to make sure configure is up to date (I hope)
#---------------------------------------------------------------------------
${srcdir}/configure: configure.in
cd ${srcdir} && autoconf
# autoheader might not change config.h.in, so touch a stamp file
${srcdir}/config.h.in: stamp-h.in
${srcdir}/stamp-h.in: configure.in
cd ${srcdir} && autoheader
echo timestamp > ${srcdir}/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
#---------------------------------------------------------------------------
# stuff for me compiling/debugging this sucker
#---------------------------------------------------------------------------
debug: moreclean
make CFLAGS="-g" LDFLAGS="-g"
make readdb CFLAGS=-g LDFLAGS="-g"
debug_both: moreclean
make CFLAGS="-g -DDEBUG1=1" LDFLAGS="-g"
profile: moreclean
make CFLAGS="-pg" LDFLAGS="-pg"
cleanrun:
rm -rf Msgs
rm -f suck.errlog suck.status suck.newrc suck.index suck.sorted suck.post \
suck.restart suck.lock suck.killlog debug.* gmon.out batch *.tmp core suck.db \
dmalloc_logfile
moreclean: clean cleanrun
rm -f suck rpost testhost lpost makephrases lmove read_db
distclean: clean cleanrun cleanconfig moreclean
rm -rf test
rm -f sucknewsrc sucknewsrc.old suckkillfile suckothermsgs batch \
phrases.h phrases.engl active active.old active-ignore suckxover suck.db.out
cleanconfig:
rm -f Makefile Spanish.docs/Makefile config.h config.cache config.status config.log
makedist: makerpm
echo "Done"
maketar: distclean
# make tar
tar -czv -f ../$(PKGNAME)-$(VERSION).tar.gz -C .. suck-$(VERSION)
makerpm: maketar
# now make RPMS
if [ "${SPECVERSION}" != "${VERSION}" ] ; then \
echo Mismatch: Makefile version ${VERSION} and .spec file version ${SPECVERSION} ; \
exit 1 ; \
fi
#pwd
rpmbuild -ta /home/bobyetman/${PKGNAME}-${VERSION}.tar.gz
# move em to my home dir and clean up
mv /usr/src/redhat/RPMS/i386/*.rpm ~
mv /usr/src/redhat/SRPMS/*.rpm ~
rm -rf /usr/src/redhat/BUILD/*
rm -rf /tmp/suck*
# now generate the .sig files
#pgps -b ~/suck*.rpm ~/suck*.tar.gz
|