source: scripts/untested/blfs-scripts/blfs-gsm.sh@ 7ed0e05

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 7ed0e05 was 7ed0e05, checked in by Jim Gifford <clfs@…>, 19 years ago

r619@server (orig r617): ryan | 2005-08-07 00:07:42 -0700
Add new packages for blfs builds



  • Property mode set to 100755
File size: 1.5 KB
Line 
1#!/bin/bash
2
3### gsm ###
4
5cd ${SRC}
6LOG=gsm-blfs.log
7
8SELF=`basename ${0}`
9set_buildenv
10set_libdirname
11setup_multiarch
12
13unpack_tarball gsm-${GSM_VER}
14cd ${PKGDIR}
15
16# Add support for building shared lib
17sed -i -e '/^LIBGSM.*/a\
18SHLIBGSM = libgsm.so.0' \
19 -e 's@^all:.*\$(LIBGSM)@& $(LIB)/$(SHLIBGSM)@' \
20 -e '/^GSM_INSTALL_TARGETS.*/a\
21 $(GSM_INSTALL_LIB)/$(SHLIBGSM) \\' \
22 -e 's@\$(LD) $(LFLAGS)@& -L$(LIB)@' \
23 -e '/\$(LD)/s@\(\$(TOAST_OBJECTS)\) \$(LIBGSM)@\1 -lgsm@g' \
24 Makefile
25
26cat >> Makefile <<"EOF"
27
28$(LIB)/$(SHLIBGSM): $(LIB) $(GSM_OBJECTS)
29 -rm $(RMFLAGS) $(LIB)/$(SHLIBGSM)
30 $(LD) $(LFLAGS) -shared -Wl,-soname=$(SHLIBGSM) \
31 $(GSM_OBJECTS) -o $(LIB)/$(SHLIBGSM)
32 $(LN) -sf $(SHLIBGSM) $(LIB)/libgsm.so
33
34$(GSM_INSTALL_LIB)/$(SHLIBGSM): $(LIB)/$(SHLIBGSM)
35 -rm $@
36 cp $? $@
37 chmod 755 $@
38 $(LN) -sf $(SHLIBGSM) $(GSM_INSTALL_LIB)/libgsm.so
39EOF
40
41max_log_init gsm ${GSM_VER} "blfs (shared)" ${BUILDLOGS} ${LOG}
42(
43 make CC="${CC-gcc} ${ARCH_CFLAGS} -ansi -pedantic" \
44 CCFLAGS="-c -O2 -pipe ${TGT_CFLAGS} -fPIC -DNeedFunctionPrototypes=1" \
45 addtst &&
46 make CC="${CC-gcc} ${ARCH_CFLAGS} -ansi -pedantic" \
47 CCFLAGS="-c -O2 -pipe ${TGT_CFLAGS} -fPIC -DNeedFunctionPrototypes=1" \
48) >> ${LOGFILE} 2>&1 &&
49echo " o Build OK" &&
50
51min_log_init ${INSTLOGS} &&
52make INSTALL_ROOT=/usr \
53 GSM_INSTALL_LIB=/usr/${libdirname} \
54 GSM_INSTALL_INC=/usr/include \
55 GSM_INSTALL_MAN=/usr/share/man \
56 install \
57 >> ${LOGFILE} 2>&1 &&
58echo " o ALL OK" || barf
59
Note: See TracBrowser for help on using the repository browser.