summaryrefslogtreecommitdiff
path: root/package/ipcad/patches/patch-Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/ipcad/patches/patch-Makefile')
-rw-r--r--package/ipcad/patches/patch-Makefile169
1 files changed, 169 insertions, 0 deletions
diff --git a/package/ipcad/patches/patch-Makefile b/package/ipcad/patches/patch-Makefile
new file mode 100644
index 000000000..8ced9f13a
--- /dev/null
+++ b/package/ipcad/patches/patch-Makefile
@@ -0,0 +1,169 @@
+--- ipcad-3.7.3.orig/Makefile 2007-04-22 10:08:45.000000000 +0200
++++ ipcad-3.7.3/Makefile 2014-03-23 17:59:56.000000000 +0100
+@@ -1,4 +1,163 @@
+-all: bootstrap
+
+-bootstrap:
+- ./configure && make
++prefix= /usr
++exec_prefix= ${prefix}
++bindir= /usr/bin
++sysconfdir= /etc
++datadir= /usr/share
++
++CC= /home/wbx/hudson/toolchain_x86_64-linux-gnu/usr/bin/arm-openadk-linux-muslgnueabihf-gcc
++LDFLAGS= -L/home/wbx/hudson/target_arm_musl_eabihf/lib -L/home/wbx/hudson/target_arm_musl_eabihf/usr/lib -Wl,-O1 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/wbx/hudson/target_arm_musl_eabihf/usr/lib -Wl,-z,relro,-z,now
++LIBS= -lpcap
++CFLAGS= -march=armv6 -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -fwrapv -fno-ident -fhonour-copts -fomit-frame-pointer -Os -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables -g3 -DHAVE_CONFIG_H -W -Wall
++CPPFLAGS=-DIPCAD_VERSION=\"3.7.3\"
++CPPFLAGS+=-DCONFIG_FILE=\"${sysconfdir}/ipcad.conf\"
++CPPFLAGS+=-DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE
++CPPFLAGS+=-DPSRC_pcap -DIFST_linux
++
++YACC=bison -y
++LEX=flex
++INSTALL=/usr/bin/install -c
++
++MANROOT=/usr/share/man/man
++MAN8=${MANROOT}8
++MAN5=${MANROOT}5
++
++NROFF= groff -Tascii -mandoc
++
++PACKAGE=ipcad
++TARGETS=ipcad
++VERSION=3.7.3
++
++IPCAD_OBJS= main.o process.o pps.o disp.o storage.o usage.o cfgy.o cfglex.o cfgread.o cfgvar.o dump.o import.o nflow.o cshelly.o cslex.o csparse.o service.o rw.o servers.o opt.o pidfile.o sf_lite.o
++IPCAD_OBJS+= ifst_linux.o # Interface statistics
++IPCAD_OBJS+= ifs_list.o # Interface statistics
++IPCAD_OBJS+= loop-pcap.o # Method of capturing
++IPCAD_OBJS+= loop-file.o # Method of capturing
++IPCAD_OBJS+= loop-divert.o # Method of capturing
++IPCAD_OBJS+= loop-dynamic.o # Method of capturing
++IPCAD_OBJS+= loop-ulog.o loop-ipq.o # Methods of capturing
++IPCAD_OBJS+= psrc.o psrc-pcap.o # Initialize capturers
++IPCAD_OBJS+= psrc-ipq.o psrc-ulog.o # Initialize capturers
++IPCAD_OBJS+= psrc-file.o # Initialize capturers
++IPCAD_OBJS+= psrc-dynamic.o # Initialize capturers
++IPCAD_OBJS+= psrc-divert.o # Initialize capturers
++IPCAD_OBJS+= wrap_oclose.o # Special file descriptors cache
++IPCAD_OBJS+= genhash.o # General hashing
++
++all: ${TARGETS} man
++
++ipcad: ${IPCAD_OBJS}
++ ${CC} ${CFLAGS} -o $@ ${IPCAD_OBJS} ${LDFLAGS} ${LIBS}
++
++.SUFFIXES:
++.SUFFIXES: .o .c .0 .8 .5
++
++.c.o:
++ ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ -c $<
++
++.8.0:
++ ${NROFF} $< > $@
++
++.5.0:
++ ${NROFF} $< > $@
++
++cfgy.h cfgy.c: cfg.y
++ ${YACC} -p ipcacfg -d cfg.y
++ @mv y.tab.c cfgy.c
++ @mv y.tab.h cfgy.h
++
++cshelly.h cshelly.c: cshell.y
++ ${YACC} -p CS -d cshell.y
++ @mv y.tab.c cshelly.c
++ @mv y.tab.h cshelly.h
++
++cslex.c: cslex.l
++ ${LEX} -s -p -Cem -ocslex.c -PCS cslex.l
++
++cfglex.c: cfglex.l
++ ${LEX} -s -p -Cem -ocfglex.c -Pipcacfg cfglex.l
++
++
++man: ipcad.8 ipcad.conf.5
++
++distdir = $(PACKAGE)-$(VERSION)
++distdir:
++ rm -rf $(distdir)
++ mkdir $(distdir)
++ cp *.c *.h $(distdir)
++ cp ipcad.8 ipcad.conf.5 $(distdir)
++ cp *.y *.l $(distdir)
++ cp *.in configure install-sh $(distdir)
++ cp ipcad.conf.default $(distdir)
++ cp ipcad.conf.simple $(distdir)
++ cp ipcad.spec.in $(distdir)
++ cp Makefile.in Makefile $(distdir)
++ cp ChangeLog INSTALL README TODO BUGS AUTHORS COPYING FAQ $(distdir)
++ cd $(distdir) && make distclean
++
++dist: distdir
++ tar chof - $(distdir) | GZIP="--best" gzip -c > $(distdir).tar.gz
++ rm -rf $(distdir)
++
++clean:
++ rm -f *.o ${TARGETS} *.core 1
++ rm -f *.0
++
++distclean: clean
++ rm -f config.h
++ rm -f config.cache config.log config.status
++ rm -f Makefile
++ rm -f $(distdir).tar.gz
++ rm -f ipcad.spec
++ (echo "all: bootstrap"; echo; echo "bootstrap:"; \
++ echo " ./configure && make") > Makefile
++
++maintainer-clean: distclean
++ @echo "This command is intended for maintainers to use; it"
++ @echo "deletes files that may need special tools to rebuild."
++ rm -f Makefile
++ rm -f *.tab.* cfgy.? *lex.c
++ rm -f config.h.in configure
++
++install: all install-bin install-conf
++
++install-bin:
++ @${INSTALL} -d $(DESTDIR)${bindir}
++ ${INSTALL} ipcad $(DESTDIR)${bindir}
++
++install-man: man
++ ${INSTALL} -m 444 ipcad.8 $(DESTDIR)${MAN8}/ipcad.8
++ ${INSTALL} -m 444 ipcad.conf.5 $(DESTDIR)${MAN5}/ipcad.conf.5
++
++install-conf:
++ @${INSTALL} -d $(DESTDIR)${sysconfdir}
++ ${INSTALL} -m 644 ipcad.conf.simple $(DESTDIR)${sysconfdir}/ipcad.conf.simple
++ -@diff ${sysconfdir}/ipcad.conf \
++ ${sysconfdir}/ipcad.conf.default >/dev/null 2>&1; \
++ if [ "$$?" -eq 0 ] || [ ! -f ${sysconfdir}/ipcad.conf ]; then \
++ echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
++ ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
++ echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf; \
++ ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf; \
++ echo "**********************************************"; \
++ echo "* Please customize ${sysconfdir}/ipcad.conf *"; \
++ echo "**********************************************"; \
++ else \
++ echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
++ ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
++ echo "*********************************************"; \
++ echo "* Updated ${sysconfdir}/ipcad.conf.default *"; \
++ echo "*********************************************"; \
++ fi
++ @echo ""
++ @echo "Now you might want to 'make install-man'"
++ @echo ""
++
++
++uninstall:
++ rm -f ${bindir}/ipcad
++ rm -f ${sysconfdir}/ipcad.conf.default
++ rm -f ${sysconfdir}/ipcad.conf.simple
++ rm -f ${MAN8}/ipcad.8
++ rm -f ${MAN5}/ipcad.conf.5
++