posaune
authorMichael Wagner <info@wagnertech.de>
Wed, 9 Mar 2016 12:59:33 +0000 (13:59 +0100)
committerMichael Wagner <info@wagnertech.de>
Wed, 9 Mar 2016 12:59:33 +0000 (13:59 +0100)
tools/make/configure
tools/make/makefile
tools/tex/wallpaper.sty [new file with mode: 0644]

index ab65ab1..9064c93 100755 (executable)
@@ -9,7 +9,7 @@ function echo_usage {
 
 # to build a package you need ...
 # <package>.co: checkout commands
-# <package>.cp: copy step
+# <package>.cp (optional): copy step for package production
 # <package>.cpp (optional): commands to setup the C++ compile environment
 
 if [ $# -lt 2 ]
@@ -37,8 +37,8 @@ then
 fi
 if [ ! -x $paket.cp ]
 then
-       echo "file $paket.cp missing or not executable."
-       exit 1
+       echo "warning: file $paket.cp missing or not executable:"
+       echo "  this file is necessary for any package production."
 fi
 
 # load util functions for C/C++ - build
@@ -48,11 +48,7 @@ then
        . Make/c_configure.sh
 fi
 
-# clean src tree and check out
-if [ -e src ]
-then
-       rm -rf src
-fi
+# clean dirs and check out
 if [ -e $paket ]
 then
        rm -rf $paket
@@ -63,19 +59,23 @@ mkdir -p src
 cwd=$(pwd)
 
 # checkout
-pushd src
-../$paket.co $build
-popd
+pushd src >/dev/null
+       ../$paket.co $build
+popd >/dev/null
 
 # copy package control
 control=$(find src -name $paket.control)
 if [ -z "$control" ]
 then
-       echo "control file not found"
-       exit 1
+       echo "warning: control file not found"
+       echo "  this file is necessary for any package production."
+else   
+       sed "s/%BUILD%/$build/" $control >$paket.control
+       echo "$paket.control written."
+
+       # extract version
+       version=$(grep Version $paket.control |sed "s/Version: //")
 fi
-sed "s/%BUILD%/$build/" $control >$paket.control
-echo "$paket.control written."
 
 # check for postinst
 postinst=$(find src -name $paket.postinst)
@@ -84,9 +84,6 @@ then
        ln -sf $postinst .
 fi
 
-# extract version
-version=$(grep Version $paket.control |sed "s/Version: //")
-
 # create generic make.pre, if not existing
 if [ ! -f make.pre ]
 then
index 8b83ff7..7fadac9 100644 (file)
@@ -12,6 +12,7 @@ DEB = fakeroot dpkg-deb --build $(project)
 project = default
 SOURCES =
 COPY_PRE =
+TEX = pdflatex
 
 # Load project specification
 include make.pre
@@ -74,3 +75,10 @@ clean:
        if [ -e $(project).zip ]; then rm $(project).zip; fi
        if [ -e $(project) ]; then rm -rf $(project); fi
 
+#-----------------------------------------------------------------
+# generische Regeln
+#-----------------------------------------------------------------
+%.pdf:%.tex
+       $(TEX) $<
+
+-include make.post
diff --git a/tools/tex/wallpaper.sty b/tools/tex/wallpaper.sty
new file mode 100644 (file)
index 0000000..c64e8c6
--- /dev/null
@@ -0,0 +1,250 @@
+%% 
+%% This is file `wallpaper.sty' v 1.10
+%%
+%% Author Michael H.F. Wilkinson 
+%%   April 21, 2006
+%% 
+%% Create background, either centered, tiled, or in any corner   
+%% relies heavily on eso-pic.sty, corrects for changes in \hoffset 
+%% by classes such as sciposter.cls
+%% Problems, bugs and comments to 
+%%        michael@cs.rug.nl
+%% version 1.10, 2006/04/21:
+%%               - Commands added for corner wallpapers 
+%%
+%% version 1.01, 2005/01/18:
+%%               - \providecommand{\LenToUnit} included to be compatible
+%%                  with earlier versions of eso-pic.sty
+%%
+%% version 1.00, 2004/12/22:
+%%               - first release
+%%
+%%
+\ProvidesPackage{wallpaper}[2005/01/18, v1.01 easy wallpaper formatting (MHFW)]
+\NeedsTeXFormat{LaTeX2e}[1995/06/01]
+
+\RequirePackage{ifthen}
+\RequirePackage{calc}
+\RequirePackage{eso-pic}
+\RequirePackage{graphicx}
+
+\providecommand{\LenToUnit}[1]{#1\@gobble}
+
+
+\newlength{\wpXoffset}
+\setlength{\wpXoffset}{-\hoffset}
+\newlength{\wpYoffset}
+\setlength{\wpYoffset}{0pt}
+\newlength{\tileXoffset}
+\newlength{\tileYoffset}
+\newlength{\tilewidth}
+\newlength{\tileheight}
+\newlength{\tileX}
+\newlength{\tileY}
+
+\newcommand{\LLCornerWallPaper}[2]{%
+\AddToShipoutPicture{%
+  \AtPageLowerLeft{%
+    \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+                     keepaspectratio]{#2}%
+    }
+  }
+}
+
+\newcommand{\ThisLLCornerWallPaper}[2]{%
+\AddToShipoutPicture*{%
+  \AtPageLowerLeft{%
+    \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+                     keepaspectratio]{#2}%
+    }
+  }
+}
+
+\newcommand{\ULCornerWallPaper}[2]{%
+  \AddToShipoutPicture{%
+    \AtPageLowerLeft{%
+      \parbox[b][\paperheight]{#1\paperwidth}{%       
+        \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+        keepaspectratio]{#2}%
+        \vfill%
+      }
+    }
+  }
+}
+
+\newcommand{\ThisULCornerWallPaper}[2]{%
+  \AddToShipoutPicture*{%
+    \AtPageLowerLeft{%
+      \parbox[b][\paperheight]{#1\paperwidth}{%       
+        \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+        keepaspectratio]{#2}%
+        \vfill%
+      }
+    }
+  }
+}
+
+\newcommand{\LRCornerWallPaper}[2]{%
+  \AddToShipoutPicture{%
+    \AtPageLowerLeft{%
+      \parbox[b]{\paperwidth}{%       
+        \hfill \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+        keepaspectratio]{#2}%
+      }
+    }
+  }
+}
+
+\newcommand{\ThisLRCornerWallPaper}[2]{%
+  \AddToShipoutPicture*{%
+    \AtPageLowerLeft{%
+      \parbox[b]{\paperwidth}{%       
+        \hfill \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+        keepaspectratio]{#2}%
+      }
+    }
+  }
+}
+
+\newcommand{\URCornerWallPaper}[2]{%
+  \AddToShipoutPicture{%
+    \AtPageLowerLeft{%
+      \parbox[b][\paperheight]{\paperwidth}{%       
+        \hfill \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+        keepaspectratio]{#2}%
+        \vfill%
+      }
+    }
+  }
+}
+\newcommand{\ThisURCornerWallPaper}[2]{%
+  \AddToShipoutPicture*{%
+    \AtPageLowerLeft{%
+      \parbox[b][\paperheight]{\paperwidth}{%       
+        \hfill \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+        keepaspectratio]{#2}%
+        \vfill%
+      }
+    }
+  }
+}
+
+\newcommand{\CenterWallPaper}[2]{%
+\AddToShipoutPicture{\put(\LenToUnit{\wpXoffset},\LenToUnit{\wpYoffset}){%
+     \parbox[b][\paperheight]{\paperwidth}{%       
+       \vfill
+       \centering
+       \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+                        keepaspectratio]{#2}%
+       \vfill
+     }}
+  }
+}  
+
+\newcommand{\ThisCenterWallPaper}[2]{%
+\AddToShipoutPicture*{\put(\LenToUnit{\wpXoffset},\LenToUnit{\wpYoffset}){%
+     \parbox[b][\paperheight]{\paperwidth}{%       
+       \vfill
+       \centering
+       \includegraphics[width=#1\paperwidth,height=#1\paperheight,%
+                        keepaspectratio]{#2}%
+       \vfill
+     }}}
+}  
+
+
+
+\newcommand{\TileSquareWallPaper}[2]{%
+\AddToShipoutPicture{%
+  \begingroup
+    \setlength{\tileYoffset}{\wpYoffset}
+    \setlength{\tilewidth}{\paperwidth/#1}%
+    \setlength{\tileheight}{\tilewidth}%
+    \setlength{\tileY}{0pt}%
+    \whiledo{\lengthtest{\tileY < \paperheight}}{% 
+      \setlength{\tileX}{0pt}%
+      \setlength{\tileXoffset}{\wpXoffset}%
+      \whiledo{\lengthtest{\tileX < \paperwidth}}{% 
+        \put(\LenToUnit{\tileXoffset},\LenToUnit{\tileYoffset}){%
+          \includegraphics[height=\tileheight,width=\tilewidth]{#2}}%
+        \addtolength{\tileX}{\tilewidth}
+        \addtolength{\tileXoffset}{\tilewidth}
+      }%
+      \addtolength{\tileY}{\tileheight}
+      \addtolength{\tileYoffset}{\tileheight}
+    }%
+  \endgroup  
+}%
+}
+
+\newcommand{\ThisTileSquareWallPaper}[2]{%
+\AddToShipoutPicture*{%
+  \begingroup
+    \setlength{\tileYoffset}{\wpYoffset}
+    \setlength{\tilewidth}{\paperwidth/#1}%
+    \setlength{\tileheight}{\tilewidth}%
+    \setlength{\tileY}{0pt}%
+    \whiledo{\lengthtest{\tileY < \paperheight}}{% 
+      \setlength{\tileX}{0pt}%
+      \setlength{\tileXoffset}{\wpXoffset}%
+      \whiledo{\lengthtest{\tileX < \paperwidth}}{% 
+        \put(\LenToUnit{\tileXoffset},\LenToUnit{\tileYoffset}){%
+          \includegraphics[height=\tileheight,width=\tilewidth]{#2}}%
+        \addtolength{\tileX}{\tilewidth}
+        \addtolength{\tileXoffset}{\tilewidth}
+      }%
+      \addtolength{\tileY}{\tileheight}
+      \addtolength{\tileYoffset}{\tileheight}
+    }%
+  \endgroup  
+}%
+}
+
+
+\newcommand{\TileWallPaper}[3]{%
+\AddToShipoutPicture{%
+  \begingroup
+    \setlength{\tileYoffset}{\wpYoffset}
+    \setlength{\tilewidth}{#1}%
+    \setlength{\tileheight}{#2}%
+    \setlength{\tileY}{0pt}%
+    \whiledo{\lengthtest{\tileY < \paperheight}}{% 
+      \setlength{\tileX}{0pt}%
+      \setlength{\tileXoffset}{\wpXoffset}%
+      \whiledo{\lengthtest{\tileX < \paperwidth}}{% 
+        \put(\LenToUnit{\tileXoffset},\LenToUnit{\tileYoffset}){%
+          \includegraphics[height=\tileheight,width=\tilewidth]{#3}}%
+        \addtolength{\tileX}{\tilewidth}
+        \addtolength{\tileXoffset}{\tilewidth}
+      }%
+      \addtolength{\tileY}{\tileheight}
+      \addtolength{\tileYoffset}{\tileheight}
+    }%
+  \endgroup  
+}%
+}
+
+\newcommand{\ThisTileWallPaper}[3]{%
+\AddToShipoutPicture*{%
+  \begingroup
+    \setlength{\tileYoffset}{\wpYoffset}
+    \setlength{\tilewidth}{#1}%
+    \setlength{\tileheight}{#2}%
+    \setlength{\tileY}{0pt}%
+    \whiledo{\lengthtest{\tileY < \paperheight}}{% 
+      \setlength{\tileX}{0pt}%
+      \setlength{\tileXoffset}{\wpXoffset}%
+      \whiledo{\lengthtest{\tileX < \paperwidth}}{% 
+        \put(\LenToUnit{\tileXoffset},\LenToUnit{\tileYoffset}){%
+          \includegraphics[height=\tileheight,width=\tilewidth]{#3}}%
+        \addtolength{\tileX}{\tilewidth}
+        \addtolength{\tileXoffset}{\tilewidth}
+      }%
+      \addtolength{\tileY}{\tileheight}
+      \addtolength{\tileYoffset}{\tileheight}
+    }%
+  \endgroup  
+}%
+}
+
+\newcommand{\ClearWallPaper}{\ClearShipoutPicture}
\ No newline at end of file