--- /dev/null
+# hdw - linux hdlmaker package
+#
+# author: hackbard@hackdaworld.org
+#
+# [V] 7.9.4
+# [S] 3-9
+# [D] hdlmaker_install.tar http://www.polybus.com/
+
+prefix=$root/opt/hdlmaker
+
+custmain=1
+
+custmain() {
+ # directory structure
+ mkdir -p $prefix/{bin,lib,doc}
+
+ # extract source
+ tar xvf $archdir/hdlmaker_install.tar
+ cd hdlmaker_install
+ mkdir -p libz
+ tar xvfz hdlmaker_lib.tar.gz -C libz
+ cd libz/hdlmaker_lib
+
+ # symlinks (according to hdlmaker install.csh)
+ ln -svf xc4000 xc4000e
+ ln -svf xc4000 xc4000ex
+ ln -svf xc4000 xc4000xl
+ ln -svf spartan spartan-xl
+ ln -svf orca2c orca2ca
+
+ # copy sample environment file
+ cp csh/hdlmaker.* $prefix/doc
+ cp README $prefix/doc
+
+ # patch source
+ cd sources/hdlmaker_sources
+ sed 's%csh -f%sh%' makepmacs > tmp~
+ mv tmp~ makepmacs
+ chmod 750 makepmacs
+
+ # build
+ export HDLMAKER_LIB=$prefix
+ export CPU=""
+ make clean
+ make -j 2 install
+ cd ../../
+ mv * $prefix/lib
+ }