Updated Makefiles and added compilation instructions to work with Enterprise

Linux (tested on CentOS 6.4 64-bit).

Init scripts and .spec files for RPM builds to follow.
git.mgm/mediaproxy-ng/github/master^2
Peter Dunkley 12 years ago committed by root
parent bbc53398f8
commit 130d485346

@ -7,7 +7,16 @@ CFLAGS+= `pkg-config --cflags openssl`
CFLAGS+= `pcre-config --cflags`
CFLAGS+= -I/lib/modules/`uname -r`/build/include/ -I../kernel-module/
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -DMEDIAPROXY_VERSION="\"$(shell dpkg-parsechangelog -l../debian/changelog | awk '/^Version: / {print $$2}')\""
ifneq ($(MEDIAPROXY_VERSION),)
CFLAGS+= -DMEDIAPROXY_VERSION="\"$(MEDIAPROXY_VERSION)\""
else
DPKG_PRSCHNGLG= $(shell which dpkg-parsechangelog 2>/dev/null)
ifneq ($(DPKG_PRSCHNGLG),)
CFLAGS+= -DMEDIAPROXY_VERSION="\"$(shell dpkg-parsechangelog -l../debian/changelog | awk '/^Version: / {print $$2}')\""
else
CFLAGS+= -DMEDIAPROXY_VERSION="\"undefined\""
endif
endif
CFLAGS+= -DMP_PLUGIN_DIR="\"/usr/lib/mediaproxy-ng\""
#CFLAGS+= -DSRTCP_KEY_DERIVATION_RFC_COMPLIANCE
@ -27,10 +36,13 @@ LDFLAGS+= `pcre-config --libs`
LDFLAGS+= `xmlrpc-c-config client --libs`
ifneq ($(DBG),yes)
# support http://wiki.debian.org/Hardening for >=wheezy
CFLAGS+= `dpkg-buildflags --get CFLAGS`
CPPFLAGS+= `dpkg-buildflags --get CPPFLAGS`
LDFLAGS+= `dpkg-buildflags --get LDFLAGS`
DPKG_BLDFLGS= $(shell which dpkg-buildflags 2>/dev/null)
ifneq ($(DPKG_BLDFLGS),)
# support http://wiki.debian.org/Hardening for >=wheezy
CFLAGS+= `dpkg-buildflags --get CFLAGS`
CPPFLAGS+= `dpkg-buildflags --get CPPFLAGS`
LDFLAGS+= `dpkg-buildflags --get LDFLAGS`
endif
endif
SRCS= main.c kernel.c poller.c aux.c control_tcp.c streambuf.c call.c control_udp.c redis.c \

@ -0,0 +1,80 @@
mediaproxy-ng for Enterprise Linux
==================================
Installing from RPMs
--------------------
TBD
RPM Compliation
---------------
TBD
Manual Compilation
------------------
There are three parts to mediaproxy-ng, each of which can be found in the
respective subdirectories.
* `daemon`
The userspace daemon and workhorse, minimum requirement for anything
to work. Running `MEDIAPROXY_VERSION="\"<version number>\"" make` will
compile the binary, which will be called `mediaproxy-ng`. The
following software packages are required to compile the daemon:
- *gcc*
- *make*
- *pkgconfig*
- *glib2-devel*
- *libcurl-devel*
- *openssl-devel*
- *pcre-devel*
- *xmlrpc-c-devel*
- *zlib-devel*
* `iptables-extension`
Required for in-kernel packet forwarding. Running
`MEDIAPROXY_VERSION="\"<version number>\"" make` will compile the plugin
for `iptables` and `ip6tables`. The file will be called
`libxt_MEDIAPROXY.so` and should be copied into the directory
`/lib/xtables/` in 32-bit environments and `/lib64/xtables/` in 64-bit
environments. The following software packages are required to compile
the plugin:
- *gcc*
- *make*
- *iptables-devel*
* `kernel-module`
Required for in-kernel packet forwarding. Compilation of the kernel
module requires the kernel development packages for the kernel version
you are using (see output of `uname -r`) to be installed. Running
`MEDIAPROXY_VERSION="\"<version number>\"" make` will compile the kernel
module.
Successful compilation of the module will produce the file
`xt_MEDIAPROXY.ko`. The module can be inserted into the running kernel
manually through `insmod xt_MEDIAPROXY.ko` (which will result in an
error if depending modules aren't loaded, for example the `x_tables`
module), but it's recommended to copy the module into
`/lib/modules/<version number>/updates/`, followed by running
`depmod -a`. After this, the module can be loaded by issuing
`modprobe xt_MEDIAPROXY`.
The following software packages are required to compile the plugin:
- *gcc*
- *make*
- *kernel-devel*
- *kernel-headers*
Note: the *kernel-devel* and *kernel-headers* packages are meta-packages
that install the headers and source for the latest kernel version. This
will be what you want unless you are running a custom or older kernel.

@ -1,5 +1,14 @@
CFLAGS = -O2 -Wall -shared -fPIC
CFLAGS += -DMEDIAPROXY_VERSION="\"$(shell dpkg-parsechangelog -l../debian/changelog | awk '/^Version: / {print $$2}')\""
ifneq ($(MEDIAPROXY_VERSION),)
CFLAGS += -DMEDIAPROXY_VERSION="\"$(MEDIAPROXY_VERSION)\""
else
DPKG_PRSCHNGLG= $(shell which dpkg-parsechangelog 2>/dev/null)
ifneq ($(DPKG_PRSCHNGLG),)
CFLAGS += -DMEDIAPROXY_VERSION="\"$(shell dpkg-parsechangelog -l../debian/changelog | awk '/^Version: / {print $$2}')\""
else
CFLAGS += -DMEDIAPROXY_VERSION="\"undefined\""
endif
endif
XTABLES = $(shell test -e /usr/include/xtables.h && echo 1)
IPTABLES = $(shell test -e /usr/include/iptables.h && echo 1)

@ -1,11 +1,18 @@
PWD := $(shell pwd)
KSRC ?= /lib/modules/$(shell uname -r)/build
KBUILD := $(KSRC)
ifeq ($(origin MEDIAPROXY_VERSION), undefined)
MEDIAPROXY_VERSION := $(shell dpkg-parsechangelog -l../debian/changelog | awk '/^Version: / {print $$2}')
export MEDIAPROXY_VERSION
ifneq ($(MEDIAPROXY_VERSION),)
EXTRA_CFLAGS += -DMEDIAPROXY_VERSION="\"$(MEDIAPROXY_VERSION)\""
else
DPKG_PRSCHNGLG= $(shell which dpkg-parsechangelog 2>/dev/null)
ifneq ($(DPKG_PRSCHNGLG),)
EXTRA_CFLAGS += -DMEDIAPROXY_VERSION="\"$(shell dpkg-parsechangelog -l../debian/changelog | awk '/^Version: / {print $$2}')\""
else
EXTRA_CFLAGS += -DMEDIAPROXY_VERSION="\"undefined\""
endif
endif
EXTRA_CFLAGS += -DMEDIAPROXY_VERSION="\"$(MEDIAPROXY_VERSION)\"" -D__MP_EXTERNAL
EXTRA_CFLAGS += -D__MP_EXTERNAL
obj-m += xt_MEDIAPROXY.o

Loading…
Cancel
Save