source: common/libs/func_blfs_deps@ 513b259

2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since 513b259 was 16938b0, checked in by Manuel Canales Esparcia <manuel@…>, 18 years ago

Updated blfs-tool dependencies.

  • Property mode set to 100644
File size: 6.3 KB
RevLine 
[fe30c61]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
[16938b0]25 echo "${UZIP_PATCH_URL} ${BLFS_SERVER}unzip/${UNZIP_PATCH} ${UNZIP_PATCH_MD5}" >> urls.lst
[fe30c61]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_LINKS}" = "y" ]] ; then
37 echo "${LINKS_URL} ${BLFS_SERVER}links/${LINKS_PKG} ${LINKS_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_LINKS}" = "y" ]] ; then
92 mv blfs-tool-deps/908-links ${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#----------------------------------#
[3e7ceed]119 PREV=""
[fe30c61]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 tidy ) pkg_tarball=${TIDY_PKG} ;;
133 unzip ) pkg_tarball=${UNZIP_PKG} ;;
134 * ) pkg_tarball=$(get_package_tarball_name $name) ;;
135 esac
136
137 # Append each name of the script files to a list (this will become
138 # the names of the targets in the Makefile)
139 blfs_tool="$blfs_tool ${this_script}"
140
141 #--------------------------------------------------------------------#
142 # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
143 #--------------------------------------------------------------------#
144 #
145 # Drop in the name of the target on a new line, and the previous target
146 # as a dependency. Also call the echo_message function.
[cd4466f]147 if [ "$PROGNAME" = "clfs2" ]; then
148 LUSER_wrt_target "${this_script}" "$PREV"
149 else
150 CHROOT_wrt_target "${this_script}" "$PREV"
151 fi
[fe30c61]152
153 # Insert instructions for unpacking the package and changing directories
154 # DocBook-XML is a zip, the build script will handle that.
[cd4466f]155 if [ "$PROGNAME" = "clfs2" ]; then
156 [[ ! "$name" = "docbook-xml" ]] && LUSER_wrt_unpack "$pkg_tarball"
157 else
158 [[ ! "$name" = "docbook-xml" ]] && CHROOT_Unpack "$pkg_tarball"
159 fi
[fe30c61]160
161 # Run the script.
[cd4466f]162 if [ "$PROGNAME" = "clfs2" ]; then
163 LUSER_wrt_RunAsUser "${file}"
164 else
165 CHROOT_wrt_RunAsRoot "$file"
166 fi
[fe30c61]167
168 # Remove the build directory(ies) except if the package build fails.
[cd4466f]169 if [ "$PROGNAME" = "clfs2" ]; then
170 [[ ! "$name" = "docbook-xml" ]] && LUSER_RemoveBuildDirs "$name"
171 else
172 [[ ! "$name" = "docbook-xml" ]] && CHROOT_wrt_RemoveBuildDirs "$name"
173 fi
[fe30c61]174
175 # Touch the tracking file.
176 case $name in
[16938b0]177 tidy ) pkg_ver=html-tidy-cvs_20070326 ;;
[fe30c61]178 unzip ) pkg_ver=unzip-5.52 ;;
179 * ) pkg_ver=$(echo $pkg_tarball | sed -e 's/.tar.*//;s/.tgz//;s/.zip//') ;;
180 esac
[cd4466f]181 if [ "$PROGNAME" = "clfs2" ]; then
182 echo -e "\t@touch \$(MOUNT_PT)$TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
183 else
184 echo -e "\t@touch $TRACKING_DIR/$pkg_ver" >> $MKFILE.tmp
185 fi
[fe30c61]186
187 # Include a touch of the target name so make can check
188 # if it's already been made.
189 wrt_touch
190 #
191 #--------------------------------------------------------------------#
192 # >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
193 #--------------------------------------------------------------------#
194
195 # Keep the script file name for Makefile dependencies.
196 PREV=${this_script}
197 done
198}
Note: See TracBrowser for help on using the repository browser.