upgpkg: sbcl 2.2.5-1
[arch-packages.git] / compface / trunk / compface-1.5.2-build.patch
blobb86cdb881acc85925ed4c4c398b24b9901711ecf
1 o Build shared library, link tools against it
2 o Make it possible to prevent stripping
3 o Add DESTDIR support
5 --- Makefile.in~ 2005-10-04 15:59:49.000000000 +0300
6 +++ Makefile.in 2006-08-02 22:23:07.000000000 +0300
7 @@ -15,6 +15,7 @@
8 INSTALL_PROGRAM = @INSTALL_PROGRAM@
9 INSTALL_DATA = @INSTALL_DATA@
10 SHELL = /bin/sh
11 +STRIP = strip
13 NAME = compface
14 UNNAME = uncompface
15 @@ -25,6 +26,7 @@
16 UNEXECUTABLE = $(BINDIR)/$(UNNAMEEXE)
17 LIBNAME = lib$(NAME).a
18 LIBRARY = $(LIBDIR)/$(LIBNAME)
19 +SHLIBNAME = lib$(NAME).so
20 MAN1DIR = $(MANDIR)/man1
21 MAN3DIR = $(MANDIR)/man3
22 OBJECTS = arith.o file.o compress.o gen.o uncompface.o
23 @@ -45,11 +47,11 @@
25 all: $(NAMEEXE) $(UNNAMEEXE)
27 -$(NAMEEXE) : cmain.o compface.o $(LIBNAME)
28 - $(CC) $(LDFLAGS) -o $@ cmain.o compface.o $(LIBNAME)
29 +$(NAMEEXE) : cmain.o compface.o $(SHLIBNAME)
30 + $(CC) $(LDFLAGS) -o $@ cmain.o compface.o -L. -l$(NAME)
32 -$(UNNAMEEXE) : uncmain.o $(LIBNAME)
33 - $(CC) $(LDFLAGS) -o $@ uncmain.o $(LIBNAME)
34 +$(UNNAMEEXE) : uncmain.o $(SHLIBNAME)
35 + $(CC) $(LDFLAGS) -o $@ uncmain.o -L. -l$(NAME)
37 $(LIBNAME) : $(OBJECTS)
38 ar rc $(LIBNAME) $(OBJECTS)
39 @@ -73,25 +75,28 @@
40 tar chzf `cat .fname`.tar.gz `cat .fname`
41 $(RM) -rf `cat .fname` .fname
43 -install: $(NAMEEXE) $(UNNAMEEXE) $(LIBNAME)
44 - $(INSTALL_PROGRAM) -d $(BINDIR) $(LIBDIR) $(MAN1DIR) $(MAN3DIR) $(INCLUDEDIR)
45 - $(INSTALL_PROGRAM) $(srcdir)/$(NAMEEXE) $(EXECUTABLE)
46 - -chmod 0755 $(EXECUTABLE)
47 - -strip $(EXECUTABLE)
48 - $(INSTALL_PROGRAM) $(srcdir)/$(UNNAMEEXE) $(UNEXECUTABLE)
49 - -chmod 0755 $(UNEXECUTABLE)
50 - -strip $(UNEXECUTABLE)
51 - $(INSTALL_DATA) $(srcdir)/$(NAME).1 $(MAN1DIR)/$(NAME).1
52 - cd $(MAN1DIR) && $(RM) ./$(UNNAME).1 && $(LN_S) $(NAME).1 $(UNNAME).1
53 - $(INSTALL_DATA) $(srcdir)/$(NAME).3 $(MAN3DIR)/$(NAME).3
54 - cd $(MAN3DIR) && $(RM) ./$(UNNAME).3 && $(LN_S) $(NAME).3 $(UNNAME).3
55 - for hdr in $(INSTALLHEADERS); do $(INSTALL_DATA) $(srcdir)/$${hdr} $(INCLUDEDIR)/$${hdr}; done
56 - $(INSTALL_DATA) $(srcdir)/$(LIBNAME) $(LIBRARY)
57 +install: $(NAMEEXE) $(UNNAMEEXE) $(SHLIBNAME)
58 + $(INSTALL_PROGRAM) -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(MAN3DIR) $(DESTDIR)$(INCLUDEDIR)
59 + $(INSTALL_PROGRAM) $(srcdir)/$(NAMEEXE) $(DESTDIR)$(EXECUTABLE)
60 + -$(STRIP) $(DESTDIR)$(EXECUTABLE)
61 + $(INSTALL_PROGRAM) $(srcdir)/$(UNNAMEEXE) $(DESTDIR)$(UNEXECUTABLE)
62 + -$(STRIP) $(DESTDIR)$(UNEXECUTABLE)
63 + $(INSTALL_DATA) $(srcdir)/$(NAME).1 $(DESTDIR)$(MAN1DIR)/$(NAME).1
64 + cd $(DESTDIR)$(MAN1DIR) && $(RM) ./$(UNNAME).1 && $(LN_S) $(NAME).1 $(UNNAME).1
65 + $(INSTALL_DATA) $(srcdir)/$(NAME).3 $(DESTDIR)$(MAN3DIR)/$(NAME).3
66 + cd $(DESTDIR)$(MAN3DIR) && $(RM) ./$(UNNAME).3 && $(LN_S) $(NAME).3 $(UNNAME).3
67 + for hdr in $(INSTALLHEADERS); do $(INSTALL_DATA) $(srcdir)/$${hdr} $(DESTDIR)$(INCLUDEDIR)/$${hdr}; done
68 + $(INSTALL_PROGRAM) $(srcdir)/$(SHLIBNAME) $(DESTDIR)$(LIBDIR)/$(SHLIBNAME).1.0.0
69 + $(LN_S) $(SHLIBNAME).1.0.0 $(DESTDIR)$(LIBDIR)/$(SHLIBNAME).1
70 + $(LN_S) $(SHLIBNAME).1 $(DESTDIR)$(LIBDIR)/$(SHLIBNAME)
72 shar :
73 shar.script $(OTHERS) $(HDRS) $(SOURCES) > $(NAME).sh
74 compress $(NAME).sh
76 +$(SHLIBNAME): $(OBJECTS)
77 + $(CC) -shared -Wl,-soname,$(SHLIBNAME).1 $(LDFLAGS) -o $(SHLIBNAME) $(OBJECTS)
79 .c.o:
80 $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<