File libcryptopp-shared.patch of Package libcryptopp

--- GNUmakefile.orig	2010-08-09 14:22:42.000000000 +0200
+++ GNUmakefile	2010-12-16 15:58:54.174167505 +0100
@@ -1,7 +1,7 @@
 CXXFLAGS = -DNDEBUG -g -O2
 #CXXFLAGS = -g
 # -fPIC is supported. Please report any breakage of -fPIC as a bug.
-# CXXFLAGS += -fPIC
+CXXFLAGS += -fPIC
 # the following options reduce code size, but breaks link or makes link very slow on some systems
 # CXXFLAGS += -ffunction-sections -fdata-sections
 # LDFLAGS += -Wl,--gc-sections
@@ -134,26 +134,29 @@
 all: cryptest.exe
 
 test: cryptest.exe
-	./cryptest.exe v
+	LD_LIBRARY_PATH=. ./cryptest.exe v
 
 clean:
 	$(RM) cryptest.exe libcryptopp.a $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
 
 install:
-	$(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
-	$(CP) *.h $(PREFIX)/include/cryptopp
-	$(CP) *.a $(PREFIX)/lib
-	$(CP) *.so $(PREFIX)/lib
-	$(CP) *.exe $(PREFIX)/bin
+	$(MKDIR) -p $(DESTDIR)$(PREFIX)/include/cryptopp $(DESTDIR)$(PREFIX)/$(LIB) $(DESTDIR)$(PREFIX)/bin
+	$(CP) *.h $(DESTDIR)$(PREFIX)/include/cryptopp
+	$(CP) libcryptopp.so.$(VERSION) $(DESTDIR)$(PREFIX)/$(LIB)
+	ln -s libcryptopp.so.$(VERSION) $(DESTDIR)$(PREFIX)/$(LIB)/libcryptopp.so.$(MAJOR)
+	ln -s libcryptopp.so.$(MAJOR) $(DESTDIR)$(PREFIX)/$(LIB)/libcryptopp.so
+	$(CP) *.exe $(DESTDIR)$(PREFIX)/bin
 
 libcryptopp.a: $(LIBOBJS)
 	$(AR) $(ARFLAGS) $@ $(LIBOBJS)
 	$(RANLIB) $@
 
 libcryptopp.so: $(LIBOBJS)
-	$(CXX) -shared -o $@ $(LIBOBJS)
+	$(CXX) -shared -Wl,-soname,libcryptopp.so.$(MAJOR) -o libcryptopp.so.$(VERSION) $(LIBOBJS) $(LDFLAGS) $(LDLIBS)
+	ln -s libcryptopp.so.$(VERSION) libcryptopp.so.$(MAJOR)
+	ln -s libcryptopp.so.$(MAJOR) $@
 
-cryptest.exe: libcryptopp.a $(TESTOBJS)
+cryptest.exe: libcryptopp.so $(TESTOBJS)
 	$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS) $(LDLIBS)
 
 nolib: $(OBJS)		# makes it faster to test changes