source: common/libs/func_blfs_deps@ e5842d6

2.3 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since e5842d6 was d09e32a, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

For blfs-tool dependencies, replaced links by linx.
Lynx have better GPM support and no locale issues.

  • Property mode set to 100644
File size: 6.4 KB
Line 
1#!/bin/bash
2
3# $Id$
4
5#----------------------------# Hardcoded URLs and MD5.
6add_blfs_deps_urls() { # No easy way to extract it.
7#----------------------------# Some FTP mirrors may not work
8
9 local BLFS_SERVER="${SERVER}/pub/blfs/conglomeration/"
10
11 if [[ "${DEP_LIBXML}" = "y" ]] ; then
12 echo "${LIBXML_URL} ${BLFS_SERVER}libxml2/${LIBXML_PKG} ${LIBXML_MD5}" >> urls.lst
13 fi
14
15 if [[ "${DEP_LIBXSLT}" = "y" ]] ; then
16 echo "${LIBXSLT_URL} ${BLFS_SERVER}libxslt/${LIBXSLT_PKG} ${LIBXSLT_MD5}" >> urls.lst
17 fi
18
19 if [[ "${DEP_TIDY}" = "y" ]] ; then
20 echo "${TIDY_URL} ${BLFS_SERVER}tidy/${TIDY_PKG} ${TIDY_MD5}" >> urls.lst
21 fi
22
23 if [[ "${DEP_UNZIP}" = "y" ]] ; then
24 echo "${UNZIP_URL} ${BLFS_SERVER}unzip/${UNZIP_PKG} ${UNZIP_MD5}" >> urls.lst
25 echo "${UNZIP_PATCH_URL} ${BLFS_SERVER}unzip/${UNZIP_PATCH} ${UNZIP_PATCH_MD5}" >> urls.lst
26 fi
27
28 if [[ "${DEP_DBXML}" = "y" ]] ; then
29 echo "${DBXML_URL} ${BLFS_SERVER}docbook-xml/${DBXML_PKG} ${DBXML_MD5}" >> urls.lst
30 fi
31
32# if [[ "${DEP_DBXSL}" = "y" ]] ; then
33# echo "${DBXSL_URL} ${BLFS_SERVER}docbook-xsl/${DBXSL_PKG} ${DBXSL_MD5}" >> urls.lst
34# fi
35
36 if [[ "${DEP_LYNX}" = "y" ]] ; then
37 echo "${LYNX_URL} ${BLFS_SERVER}lynx/${LYNX_PKG} ${LYNX_MD5}" >> urls.lst
38 fi
39
40 if [[ "${DEP_SUDO}" = "y" ]] ; then
41 echo "${SUDO_URL} ${BLFS_SERVER}sudo/${SUDO_PKG} ${SUDO_MD5}" >> urls.lst
42 echo "${SUDO_PATCH_URL} ${BLFS_SERVER}sudo/${SUDO_PATCH} ${SUDO_PATCH_MD5}" >> urls.lst
43 fi
44
45 if [[ "${DEP_WGET}" = "y" ]] ; then
46 echo "${WGET_URL} ${BLFS_SERVER}wget/${WGET_PKG} ${WGET_MD5}" >> urls.lst
47 fi
48
49 if [[ "${DEP_SVN}" = "y" ]] ; then
50 echo "${SVN_URL} ${BLFS_SERVER}subversion/${SVN_PKG} ${SVN_MD5}" >> urls.lst
51 fi
52
53 if [[ "${DEP_GPM}" = "y" ]] ; then
54 echo "${GPM_URL} ${BLFS_SERVER}gpm/${GPM_PKG} ${GPM_MD5}" >> urls.lst
55 echo "${GPM_PATCH_1_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_1} ${GPM_PATCH_1_MD5}" >> urls.lst
56 echo "${GPM_PATCH_2_URL} ${BLFS_SERVER}gpm/${GPM_PATCH_2} ${GPM_PATCH_2_MD5}" >> urls.lst
57 fi
58
59}
60
61#----------------------------# Maybe there is a better way to do this, but this
62copy_blfs_deps_scripts() { # method avoid to place the test on all
63#----------------------------# $PROGNAME/master.sh scripts.
64
65 mkdir -p ${PROGNAME}-commands/blfs-tool-deps
66
67 if [[ "${DEP_LIBXML}" = "y" ]] ; then
68 mv blfs-tool-deps/901-libxml2 ${PROGNAME}-commands/blfs-tool-deps
69 fi
70
71 if [[ "${DEP_LIBXSLT}" = "y" ]] ; then
72 mv blfs-tool-deps/902-libxslt ${PROGNAME}-commands/blfs-tool-deps
73 fi
74
75 if [[ "${DEP_TIDY}" = "y" ]] ; then
76 mv blfs-tool-deps/903-tidy ${PROGNAME}-commands/blfs-tool-deps
77 fi
78
79 if [[ "${DEP_UNZIP}" = "y" ]] ; then
80 mv blfs-tool-deps/904-unzip ${PROGNAME}-commands/blfs-tool-deps
81 fi
82
83 if [[ "${DEP_DBXML}" = "y" ]] ; then
84 mv blfs-tool-deps/905-docbook-xml ${PROGNAME}-commands/blfs-tool-deps
85 fi
86
87# if [[ "${DEP_DBXSL}" = "y" ]] ; then
88# mv blfs-tool-deps/906-docbook-xsl ${PROGNAME}-commands/blfs-tool-deps
89# fi
90
91 if [[ "${DEP_LYNX}" = "y" ]] ; then
92 mv blfs-tool-deps/908-lynx ${PROGNAME}-commands/blfs-tool-deps
93 fi
94
95 if [[ "${DEP_SUDO}" = "y" ]] ; then
96 mv blfs-tool-deps/909-sudo ${PROGNAME}-commands/blfs-tool-deps
97 fi
98
99 if [[ "${DEP_WGET}" = "y" ]] ; then
100 mv blfs-tool-deps/910-wget ${PROGNAME}-commands/blfs-tool-deps
101 fi
102
103 if [[ "${DEP_SVN}" = "y" ]] ; then
104 mv blfs-tool-deps/911-subversion ${PROGNAME}-commands/blfs-tool-deps
105 fi
106
107 if [[ "${DEP_GPM}" = "y" ]] ; then
108 mv blfs-tool-deps/907-gpm ${PROGNAME}-commands/blfs-tool-deps
109 fi
110
111 rm -rf blfs-tool-deps
112
113}
114
115
116#----------------------------------#
117wrt_blfs_tool_targets() { #
118#----------------------------------#
119 PREV=""
120
121 echo "${tab_}${GREEN}Processing... ${L_arrow}BLFS_TOOL ${R_arrow}"
122
123 for file in blfs-tool-deps/* ; do
124 # Keep the script file name
125 this_script=`basename $file`
126
127 # Grab the name of the target
128 name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
129
130 # Find the package.
131 case $name in
132 lynx ) pkg_tarball=${LYNX_PKG} ;;
133 tidy ) pkg_tarball=${TIDY_PKG} ;;
134 unzip ) pkg_tarball=${UNZIP_PKG} ;;
135 * ) pkg_tarball=$(get_package_tarball_name $name) ;;
136 esac
137
138 # Append each name of the script files to a list (this will become
139 # the names of the targets in the Makefile)
140 blfs_tool="$blfs_tool ${this_script}"
141
142 #--------------------------------------------------------------------#
143 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
144 #--------------------------------------------------------------------#
145 #
146 # Drop in the name of the target on a new line, and the previous target
147 # as a dependency. Also call the echo_message function.
148 if [ "$PROGNAME" = "clfs2" ]; then
149 LUSER_wrt_target "${this_script}" "$PREV"
150 else
151 CHROOT_wrt_target "${this_script}" "$PREV"
152 fi
153
154 # Insert instructions for unpacking the package and changing directories
155 # DocBook-XML is a zip, the build script will handle that.
156 if [ "$PROGNAME" = "clfs2" ]; then
157 [[ ! "$name" = "docbook-xml" ]] && LUSER_wrt_unpack "$pkg_tarball"
158 else
159 [[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
160 fi
161
162 # Run the script.
163 if [ "$PROGNAME" = "clfs2" ]; then
164 LUSER_wrt_RunAsUser "${file}"
165 else
166 CHROOT_wrt_RunAsRoot "$file"
167 fi
168
169 # Remove the build directory(ies) except if the package build fails.
170 if [ "$PROGNAME" = "clfs2" ]; then
171 [[ ! "$name" = "docbook-xml" ]] && LUSER_RemoveBuildDirs "$name"
172 else
173 [[ ! "$name" = "docbook-xml" ]] && CHROOT_wrt_RemoveBuildDirs "$name"
174 fi
175
176 # Touch the tracking file.
177 case $name in
178 docbook-xml ) pkg_ver=DocBook-4.5 ;;
179 lynx ) pkg_ver=lynx-2.8.6 ;;
180 tidy ) pkg_ver=html-tidy-cvs_20070326 ;;
181 unzip ) pkg_ver=unzip-5.52 ;;
182 * ) pkg_ver=$(echo $pkg_tarball | sed -e 's/.tar.*//;s/.tgz//;s/.zip//') ;;
183 esac
184 if [ "$PROGNAME" = "clfs2" ]; then
185 echo -e "\t@touch \$(MOUNT_PT)$TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
186 else
187 echo -e "\t@touch $TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
188 fi
189
190 # Include a touch of the target name so make can check
191 # if it's already been made.
192 wrt_touch
193 #
194 #--------------------------------------------------------------------#
195 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
196 #--------------------------------------------------------------------#
197
198 # Keep the script file name for Makefile dependencies.
199 PREV=${this_script}
200 done
201}
Note: See TracBrowser for help on using the repository browser.