20210528 - a Slackware upgrade causes the page rendering to fail. Apologies and I am looking for the cause.
Reported as https://forum.dokuwiki.org/d/19270-dokuwiki-instance-no-longer-rendering-some-syntax-correctly

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:misc:anatomy_of_a_slackbuild [2019/12/28 11:17 (UTC)]
captain_sensible [Anatomy Of a Slackbuild]
howtos:misc:anatomy_of_a_slackbuild [2020/01/05 16:49 (UTC)] (current)
captain_sensible [Anatomy Of a Slackbuild]
Line 154: Line 154:
 </code> </code>
  
-Before we go into this let me have a look in my slackware file  system and see whats there at /tmp/SBo.Taking a quick look at the image will give you a clue that the slackbuild works, by using the /tmp/SBo/ directory and creates a directory with the syntax package-packagename.So if we now have a look at the code above. CWD (current working directory)  is a  variable and is set to the value of pwd. If you run that in a terminal window, it will tell you where you in a bash context where you are working from.{{howtos:misc:tmp_Sbo.gif}}+Before we go into this let me have a look in my slackware file  system and see whats there at /tmp/SBo.Taking a quick look at the image will give you a clue that the slackbuild works, by using the /tmp/SBo/ directory and creates a directory with the syntax package-packagename.So if we now have a look at the code above. CWD (current working directory)  is a  variable and is set to the value of pwd. If you run that in a terminal window, it will tell you where you in a bash context where you are working from.{{ howtos:misc:tmp_Sbo.gif }}
  
 TMP is going to be set to /tmp/SBo. TMP is going to be set to /tmp/SBo.
Line 300: Line 300:
 $PKG equates to /tmp/SBo/package-latex2html $PKG equates to /tmp/SBo/package-latex2html
  
- --- //[[wiki:user:captain_sensible|andy brookes]] 2019/12/12 20:43 (UTC)//If you teach maths it doesn't stop you  embedding a little English.  +Next Block of code:\\ 
 + 
 +<code> 
 + 
 +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ 
 +  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true 
 + 
 +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION 
 +cp -a \ 
 + FAQ INSTALL LICENSE MANIFEST README.md TODO  \ 
 +  $PKG/usr/doc/$PRGNAM-$VERSION 
 +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild 
 +cp $CWD/manual.pdf  $PKG/usr/doc/$PRGNAM-$VERSION 
 + 
 +mkdir -p $PKG/install 
 +cat $CWD/slack-desc > $PKG/install/slack-desc  
 + 
 +cd $PKG 
 +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} 
 + 
 +</code> 
 + 
 +The first two lines of this block are a bit of a mouth-full: 
 +<code> 
 +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ 
 +  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true 
 +</code> 
 + 
 +We can however pick out key words that are commands and that can help to make some sense of it. 
 +ind" located at /usr/bin/find is a powerful utility  that has around 50 options. It basically does what it says on the can.With the -print0 option it separates what it finds with "\000"  - in a word NULL.  
 + 
 +The "|" or pipe is used to pass the results of a command to another;in this case xargs which has a flag -0. This option  is for xargs to accept input that has /000 between them. ELF is is Executable & Linkable Format. 
 + 
 +To give a succinct answer the two lines are removing debugging symbols and other unnecessary stuff to make the binaries smaller, faster and take up less memory. 
 + 
 +<code> 
 +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION 
 +</code> 
 + 
 +Here we are preparing a directory which will be called "latex2html-2019.2" located at  /usr/doc. This is so we an put relevant documentation into a directory relevantly called, so that a user can access documentation on the package. 
 +The next lines put files such as  README.md into the /usr/doc/latex2html-2019.2 directory. 
 + 
 +<code> 
 +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild 
 +</code> 
 + 
 +That line goes back to the original directory that Latex2html.SlackBuild was run from ( i previously quoted Desktop) opens up the SlackBuild with "cat"  command and copies it to the documentation directory.  
 +Now before I submitted latex2html to slackbuilds obviously I did some testing and found that when the package was installed it had a fairly comprehensive output of what it could do just using:  
 + 
 +<code> 
 +$ latex2html --help 
 +</code>  
 + 
 +Also I had access to a comprehensive manual in pdf format; so in my case I did not write code for man pages. Instead I simply put a copy of "manual.pdf" into the /usr/doc/latex2html-2019.2 directory. 
 + 
 + 
 + --- //[[wiki:user:captain_sensible|andy brookes]] 2020/01/05 16:29 (UTC)// 
 + 
 +//If you teach maths it doesn't stop you  embedding a little English.//  
  
  
 +Blank slackbuild templates can be obtained from : [[https://slackbuilds.org/templates/]]
  
 ====== Sources ====== ====== Sources ======

In Other Languages
QR Code
QR Code howtos:misc:anatomy_of_a_slackbuild (generated for current page)