summaryrefslogtreecommitdiff
path: root/multimedia/rtmpdump/rtmpdump-makefiles.patch
blob: a1bdb7761c24b0d2f91b59bf9cd321ef67b3341a (plain)
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
diff -Naur rtmpdump-2.2e.orig/Makefile rtmpdump-2.2e/Makefile
--- rtmpdump-2.2e.orig/Makefile	2010-05-29 09:42:20.000000000 +0200
+++ rtmpdump-2.2e/Makefile	2010-06-14 21:22:21.904425447 +0200
@@ -57,7 +57,7 @@
 	cp rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT) $(SBINDIR)
 	cp rtmpdump.1 $(MANDIR)/man1
 	cp rtmpgw.8 $(MANDIR)/man8
-	@cd librtmp; $(MAKE) install $(MAKEFLAGS)
+	@cd librtmp; $(MAKE) install
 
 clean:
 	rm -f *.o rtmpdump$(EXT) rtmpgw$(EXT) rtmpsrv$(EXT) rtmpsuck$(EXT)
diff -Naur rtmpdump-2.2e.orig/librtmp/Makefile rtmpdump-2.2e/librtmp/Makefile
--- rtmpdump-2.2e.orig/librtmp/Makefile	2010-05-29 09:42:20.000000000 +0200
+++ rtmpdump-2.2e/librtmp/Makefile	2010-06-14 21:23:12.932433342 +0200
@@ -28,7 +28,7 @@
 LIBDIR=$(DESTDIR)$(libdir)
 MANDIR=$(DESTDIR)$(mandir)
 
-all:	librtmp.a
+all:	librtmp.a librtmp.so librtmp.pc
 
 clean:
 	rm -f *.o *.a
@@ -36,6 +36,9 @@
 librtmp.a: rtmp.o log.o amf.o hashswf.o parseurl.o
 	$(AR) rs $@ $?
 
+librtmp.so: rtmp.o log.o amf.o hashswf.o parseurl.o
+	$(CC) -shared -Wl,-soname,librtmp.so.2 -o librtmp.so.2.2 *.o
+
 log.o: log.c log.h Makefile
 rtmp.o: rtmp.c rtmp.h rtmp_sys.h handshake.h dh.h log.h amf.h Makefile
 amf.o: amf.c amf.h bytes.h log.h Makefile
@@ -46,9 +49,12 @@
 	sed -e "s;@prefix@;$(prefix);" -e "s;@VERSION@;$(VERSION);" \
 		-e "s;@CRYPTO_REQ@;$(CRYPTO_REQ);" librtmp.pc.in > $@
 
-install:	librtmp.a librtmp.pc
+install:	librtmp.a librtmp.so librtmp.pc
 	-mkdir -p $(INCDIR) $(LIBDIR)/pkgconfig $(MANDIR)/man3
 	cp amf.h http.h log.h rtmp.h $(INCDIR)
 	cp librtmp.a $(LIBDIR)
+	ln -s librtmp.so.2.2 librtmp.so.2
+	ln -s librtmp.so.2.2 librtmp.so
+	cp -a librtmp.s* $(LIBDIR)
 	cp librtmp.pc $(LIBDIR)/pkgconfig
 	cp librtmp.3 $(MANDIR)/man3