~ubuntu-branches/ubuntu/natty/libhdhomerun/natty

« back to all changes in this revision

Viewing changes to debian/patches/add-soname.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-22 14:27:34 UTC
  • mfrom: (0.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20101222142734-vz94tw5pa9icndg1
Tags: 20100828-1
* New upstream release
* Update download URL in debian/copyright, rules and watch
* Update get-orig-changelog script for new changelog page
* Bump Standards-Version to 3.9.1
* Bump debhelper compatibility to 8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
# Author: John Baab <rhpot1991@ubuntu.com> 
3
 
# Forwarded: yes
4
 
# Last-Update: 2010-02-03
5
 
# Description: Adds soname data to libhdhomerun 
6
 
 
7
 
@DPATCH@
8
 
diff -urNad trunk~/Makefile trunk/Makefile
9
 
--- trunk~/Makefile     2010-02-02 10:39:09.000000000 -0500
10
 
+++ trunk/Makefile      2010-02-03 21:30:06.244518836 -0500
11
 
@@ -11,6 +11,8 @@
12
 
 LIBSRCS += hdhomerun_sock_posix.c
13
 
 LIBSRCS += hdhomerun_video.c
14
 
 
15
 
+LIBVERSION = 1.0.0
16
 
+SONAME = 1
17
 
 CC    := $(CROSS_COMPILE)gcc
18
 
 STRIP := $(CROSS_COMPILE)strip
19
 
 
20
 
@@ -24,7 +26,9 @@
21
 
   LDFLAGS += -liphlpapi
22
 
 else
23
 
   OS := $(shell uname -s)
24
 
-  LIBEXT := .so
25
 
+  LIBEXT := .so.$(LIBVERSION)
26
 
+  SOEXT := .so.$(SONAME)
27
 
+  SHARED := -shared -Wl,-soname,libhdhomerun$(SOEXT)
28
 
   ifeq ($(OS),Linux)
29
 
     LDFLAGS += -lrt
30
 
   endif
31
 
@@ -46,10 +50,13 @@
32
 
 
33
 
 libhdhomerun$(LIBEXT) : $(LIBSRCS)
34
 
        $(CC) $(CFLAGS) -fPIC -DDLL_EXPORT $(SHARED) $+ $(LDFLAGS) -o $@
35
 
+       ifeq ($(OS),$(or Linux,SunOS))
36
 
+               ln -s $@ libhdhomerun.so
37
 
+       endif
38
 
 
39
 
 clean :
40
 
        -rm -f hdhomerun_config$(BINEXT)
41
 
-       -rm -f libhdhomerun$(LIBEXT)
42
 
+       -rm -f libhdhomerun.*
43
 
 
44
 
 distclean : clean
45