Commit 81bb34b9 authored by Jørn Åne de Jong's avatar Jørn Åne de Jong

Add building of RPM and DEB packages

parent 3c9083ff
*.o
*.rpm
*.deb
*~
/crude/crude
/rude/rude
......
......@@ -18,6 +18,16 @@ all:
(cd $$i && $(MAKE) all) \
done
rpm:
@for i in $(SUBDIRS); do \
(cd $$i && $(MAKE) rpm) \
done
deb:
@for i in $(SUBDIRS); do \
(cd $$i && $(MAKE) deb) \
done
clean:
rm -f *~ config.cache config.log config.status
@for i in $(SUBDIRS); do \
......
......@@ -11,7 +11,7 @@
##############################################################################
# Process any command-line arguments and find the source code directory
AC_INIT(rude/main.c)
AC_INIT([RUDE and CRUDE], m4_esyscmd([grep VERSION include/rude.h | cut -d\" -f2 | tr -d '\n']))
# Set the auxilary directory, make and install
AC_CONFIG_AUX_DIR(autoconf)
......
......@@ -19,15 +19,17 @@ mandir = @mandir@/man8
sbindir = @sbindir@
srcdir = @srcdir@
INSTALL = @INSTALL@ -o root -g root -m 0755
VPATH = @srcdir@
BININSTALL = @INSTALL@ -o root -g root -m 0755
MANINSTALL = @INSTALL@ -o root -g root -m 0644
VERSION = @PACKAGE_VERSION@
VPATH = @srcdir@
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DEFS = @DEFS@
LIBS = @LIBS@
MAN8 = crude.8
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DEFS = @DEFS@
LIBS = @LIBS@
MAN8 = crude.8
CRUDE_OBJS = main.o ../rude/mcast.o
......@@ -43,14 +45,24 @@ crude: $(CRUDE_OBJS)
$(CC) $(CFLAGS) $(LIBS) $(DEFS) $(LDFLAGS) -o crude $(CRUDE_OBJS)
clean:
rm -f *~ *.o crude
rm -f *~ *.o *.rpm *.deb crude
distclean:
rm -f *~ *.o crude Makefile
rm -f *~ *.o *.rpm *.deb crude Makefile
install: crude
@if [ ! -d $(bindir) ]; then mkdir -m 0755 $(bindir); fi;
$(INSTALL) crude $(bindir)
$(BININSTALL) crude $(bindir)
@if [ ! -d $(mandir) ]; then mkdir -m 0755 $(mandir); fi;
$(INSTALL) crude.8 $(mandir)
$(MANINSTALL) crude.8 $(mandir)
rpm deb: | crude
fpm -s dir -t $@ -n crude -v $(VERSION) \
--replaces crude \
--description "collector for rude (real-time UDP data emitter)" \
--url "http://rude.sourceforge.net" \
crude=$(bindir)/crude \
crude.8=$(mandir)/crude.8 \
##############################################################################
......@@ -19,15 +19,17 @@ mandir = @mandir@/man8
sbindir = @sbindir@
srcdir = @srcdir@
INSTALL = @INSTALL@ -o root -g root -m 0755
VPATH = @srcdir@
BININSTALL = @INSTALL@ -o root -g root -m 0755
MANINSTALL = @INSTALL@ -o root -g root -m 0644
VERSION = @PACKAGE_VERSION@
VPATH = @srcdir@
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DEFS = @DEFS@
LIBS = @LIBS@
MAN8 = rude.8
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DEFS = @DEFS@
LIBS = @LIBS@
MAN8 = rude.8
RUDE_OBJS = flow_cntl.o flow_txmit.o main.o parse.o mcast.o
......@@ -43,16 +45,24 @@ rude: $(RUDE_OBJS)
$(CC) $(CFLAGS) $(LIBS) $(DEFS) $(LDFLAGS) -o rude $(RUDE_OBJS)
clean:
rm -f *~ *.o rude
rm -f *~ *.o *.rpm *.deb rude
distclean:
rm -f *~ *.o rude Makefile
rm -f *~ *.o *.rpm *.deb rude Makefile
install: rude
@if [ ! -d $(bindir) ]; then mkdir -m 0755 $(bindir); fi;
$(INSTALL) rude $(bindir)
$(BININSTALL) rude $(bindir)
@if [ ! -d $(mandir) ]; then mkdir -m 0755 $(mandir); fi;
$(INSTALL) rude.8 $(mandir)
$(MANINSTALL) rude.8 $(mandir)
rpm deb: | rude
fpm -s dir -t $@ -n rude -v $(VERSION) \
--replaces rude \
--description "real-time UDP data emitter" \
--url "http://rude.sourceforge.net" \
rude=$(bindir)/rude \
rude.8=$(mandir)/rude.8 \
##############################################################################
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment