aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2014-04-25 18:50:41 +0800
committerTing-Wei Lan <lantw44@gmail.com>2014-04-25 18:50:41 +0800
commit4a0c48160f53a691131377971cce68d8d7f9372d (patch)
tree67a6048d1b10ce9c63f1b60f103ea9a74d91e4f8
parentc6fa3f70b21c8736d4ec338bd57bbb57dd45365e (diff)
downloadwspkg-4a0c48160f53a691131377971cce68d8d7f9372d.tar
wspkg-4a0c48160f53a691131377971cce68d8d7f9372d.tar.gz
wspkg-4a0c48160f53a691131377971cce68d8d7f9372d.tar.bz2
wspkg-4a0c48160f53a691131377971cce68d8d7f9372d.tar.lz
wspkg-4a0c48160f53a691131377971cce68d8d7f9372d.tar.xz
wspkg-4a0c48160f53a691131377971cce68d8d7f9372d.tar.zst
wspkg-4a0c48160f53a691131377971cce68d8d7f9372d.zip
將所有資料檔移出這個 repo,讓資料檔和 script 分開管理
-rw-r--r--Makefile39
-rw-r--r--Makefile.debian26
-rw-r--r--Makefile.freebsd52
-rw-r--r--debian.in/debian.control.in12
-rw-r--r--debian.in/debian.pkg358
-rw-r--r--debian.in/debian.sed3
-rwxr-xr-xdebian/debian.control.sh (renamed from debian.sh/debian.control.sh)0
-rw-r--r--debian/debian.mk29
-rw-r--r--freebsd.in/freebsd.local.217.pkg-descr3
-rw-r--r--freebsd.in/freebsd.local.Makefile8
-rw-r--r--freebsd.in/freebsd.local.Makefile.inc7
-rw-r--r--freebsd.in/freebsd.makefile.in24
-rw-r--r--freebsd.in/freebsd.pkg349
-rw-r--r--freebsd.in/freebsd.sed12
-rwxr-xr-xfreebsd.sh/freebsd.install.sh21
-rwxr-xr-xfreebsd/freebsd.install.sh36
-rwxr-xr-xfreebsd/freebsd.makefile.sh (renamed from freebsd.sh/freebsd.makefile.sh)0
-rw-r--r--freebsd/freebsd.mk47
-rw-r--r--freebsd/freebsd.ports.find.c (renamed from freebsd.in/freebsd.ports.find.c)0
-rwxr-xr-xfreebsd/freebsd.ports.sh (renamed from freebsd.sh/freebsd.ports.sh)0
-rw-r--r--packages.h363
-rw-r--r--packages.mk83
-rwxr-xr-xpackages.sh26
-rw-r--r--wspkg-doc/chinese.tex (renamed from chinese.tex)0
-rw-r--r--wspkg-doc/debian.txt (renamed from debian.doc/debian.txt)0
-rw-r--r--wspkg-doc/freebsd.txt (renamed from freebsd.doc/freebsd.txt)0
-rw-r--r--wspkg-mk/packages.mk42
-rw-r--r--wspkg-mk/silent.mk (renamed from silent.mk)8
-rwxr-xr-xwspkg-sh/packages-cpp.sh28
29 files changed, 264 insertions, 1312 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b7756eb
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,39 @@
+# vim: set ts=8 sts=8 sw=8 ft=make:
+
+.POSIX:
+.SUFFIXES:
+.SUFFIXES: .txt .html .xml .pdf
+
+V= 0
+CC= c99
+ASCIIDOC= asciidoc
+PANDOC= pandoc
+
+# Include silent rules
+include wspkg-mk/silent.mk
+
+all_binaries= freebsd/freebsd.ports.find
+all_docs_html= README.html wspkg-doc/debian.html wspkg-doc/freebsd.html
+all_docs_pdf= $(all_docs_html:.html=.pdf)
+
+all: $(all_binaries) $(all_docs_html) $(all_docs_pdf)
+
+freebsd/freebsd.ports.find: freebsd/freebsd.ports.find.c
+ $(AT_CC)$(CC) -DHASH_TABLE_SIZE=50000 \
+ freebsd/freebsd.ports.find.c -o \
+ freebsd/freebsd.ports.find
+
+# Generate documentation using asciidoc and pandoc
+.txt.html:
+ -$(AT_DOC)$(ASCIIDOC) -a toc2 -b html -o - "$<" | \
+ sed 's/,serif/,sans-serif/' > "$@" $(RM_IF_FAIL)
+.txt.xml:
+ -$(AT_DOC)$(ASCIIDOC) -b docbook -o "$@" "$<"
+.xml.pdf:
+ -$(AT_DOC)$(PANDOC) -f docbook -t latex --latex-engine=xelatex \
+ -V geometry:margin=1in -H wspkg-doc/chinese.tex -o "$@" "$<"
+
+clean:
+ rm -f $(all_binaries)
+distclean: clean
+ rm -f $(all_docs_html) $(all_docs_pdf)
diff --git a/Makefile.debian b/Makefile.debian
deleted file mode 100644
index 9ef00ed..0000000
--- a/Makefile.debian
+++ /dev/null
@@ -1,26 +0,0 @@
-# vim: set ts=8 sts=8 sw=8 ft=make:
-# Create .deb meta-package for Debian
-
-PLATFORM= debian
-OUTPUT_DOC= $(PLATFORM_DOC)/debian.html $(PLATFORM_DOC)/debian.pdf
-OUTPUT_PKG= $(PLATFORM_OUT)/217-meta.deb
-OUTPUT_TMPDIR= $(PLATFORM_OUT)/217-meta
-
-CLEAN_DOC_FILES= $(OUTPUT_DOC)
-
-include packages.mk
-
-debian: $(OUTPUT_DOC) $(OUTPUT_PKG)
-
-# debian.control.in + debian.list --(debian.control.sh)-> debian.control
-CONTROL_SH= $(PLATFORM_SH)/debian.control.sh
-CONTROL_IN= $(PLATFORM_IN)/debian.control.in
-CONTROL_OUT= $(PLATFORM_OUT)/debian.control
-$(CONTROL_OUT): $(CONTROL_SH) $(CONTROL_IN) $(PKGLIST_OUT)
- $(AT_GEN)./$(CONTROL_SH) $(CONTROL_IN) $(PKGLIST_OUT) > $(CONTROL_OUT) $(RM_IF_FAIL)
-
-# debian.control -> 217-meta.deb
-$(OUTPUT_PKG): $(CONTROL_OUT)
- -@mkdir -p $(OUTPUT_TMPDIR)/DEBIAN
- $(AT_COPY)cp -pf $(CONTROL_OUT) $(OUTPUT_TMPDIR)/DEBIAN/control
- $(AT_PKG)dpkg-deb --build $(OUTPUT_TMPDIR) $(OUTPUT_PKG)
diff --git a/Makefile.freebsd b/Makefile.freebsd
deleted file mode 100644
index 6c2e941..0000000
--- a/Makefile.freebsd
+++ /dev/null
@@ -1,52 +0,0 @@
-# vim: set ts=8 sts=8 sw=8 ft=make:
-# Create meta-ports for FreeBSD
-
-PLATFORM= freebsd
-OUTPUT_DOC= $(PLATFORM_DOC)/freebsd.html $(PLATFORM_DOC)/freebsd.pdf
-OUTPUT_PKG= $(PLATFORM_OUT)/217/Makefile
-OUTPUT_PKGDESC=$(PLATFORM_OUT)/217/pkg-descr
-OUTPUT_PKGDIR= $(PLATFORM_OUT)/217
-
-CLEAN_DOC_FILES= $(OUTPUT_DOC)
-CLEAN_EXE_FILES= $(PORTS_FIND_BIN)
-
-include packages.mk
-
-
-PKGDESC_IN= $(PLATFORM_IN)/freebsd.local.217.pkg-descr
-
-freebsd: $(OUTPUT_DOC) $(OUTPUT_PKG) $(OUTPUT_PKGDESC)
-
-# freebsd.ports.find.c -> freebsd.ports.find
-PORTS_FIND_C= $(PLATFORM_IN)/freebsd.ports.find.c
-PORTS_FIND_BIN=$(PLATFORM_SH)/freebsd.ports.find
-$(PORTS_FIND_BIN): $(PORTS_FIND_C)
- $(AT_CC)$(CC) -DHASH_TABLE_SIZE=50000 $(PORTS_FIND_C) -o $(PORTS_FIND_BIN)
-
-# freebsd.list --(freebsd.ports.sh + freebsd.ports.find)-> freebsd.ports
-PORTS_SH= $(PLATFORM_SH)/freebsd.ports.sh
-PORTS_OUT= $(PLATFORM_OUT)/freebsd.ports
-$(PORTS_OUT): $(PORTS_SH) $(PKGLIST_OUT) $(PORTS_FIND_BIN)
- $(AT_GEN)./$(PORTS_SH) $(PKGLIST_OUT) > $(PORTS_OUT) $(RM_IF_FAIL)
-
-# freebsd.makefile.in + freebsd.ports --(freebsd.makefile.sh)-> freebsd.makefile
-MAKEFILE_SH= $(PLATFORM_SH)/freebsd.makefile.sh
-MAKEFILE_IN= $(PLATFORM_IN)/freebsd.makefile.in
-MAKEFILE_OUT= $(PLATFORM_OUT)/freebsd.makefile
-$(MAKEFILE_OUT): $(MAKEFILE_SH) $(MAKEFILE_IN) $(PORTS_OUT)
- $(AT_GEN)./$(MAKEFILE_SH) $(MAKEFILE_IN) $(PORTS_OUT) > $(MAKEFILE_OUT) $(RM_IF_FAIL)
-
-# freebsd.makefile -> 217/Makefile
-$(OUTPUT_PKG): $(MAKEFILE_OUT)
- -@mkdir -p $(OUTPUT_PKGDIR)
- $(AT_COPY)cp -pf $(MAKEFILE_OUT) $(OUTPUT_PKG)
-
-# freebsd.local.217.pkg-descr -> 217/pkg-descr
-$(OUTPUT_PKGDESC): $(PKGDESC_IN)
- -@mkdir -p $(OUTPUT_PKGDIR)
- $(AT_COPY)cp -pf $(PKGDESC_IN) $(OUTPUT_PKGDESC)
-
-
-# Install meta-ports for FreeBSD
-freebsd-install: freebsd
- $(AT_INSTALL)./$(PLATFORM_SH)/freebsd.install.sh
diff --git a/debian.in/debian.control.in b/debian.in/debian.control.in
deleted file mode 100644
index dc83f67..0000000
--- a/debian.in/debian.control.in
+++ /dev/null
@@ -1,12 +0,0 @@
-Package: 217-meta
-Version: 0.0.114
-Section: admin
-Priority: required
-Architecture: all
-Pre-Depends: debconf (>= 0.5) | debconf-2.0
-Depends: @DEBIAN_DOT_LIST@
-Replaces: dict
-Maintainer: 217TA <217ta@csie.ntu.edu.tw>
-Description: 217 meta package
- This package is a meta package for 217.
- It includes packages for general use.
diff --git a/debian.in/debian.pkg b/debian.in/debian.pkg
deleted file mode 100644
index 7757568..0000000
--- a/debian.in/debian.pkg
+++ /dev/null
@@ -1,358 +0,0 @@
-// vim: ft=c: et
-
-// ===========================================================================
-// Packages mapping started from here
-// ===========================================================================
-
-// Keyring
-
-// Standard
-#define BC bc
-#define BIND bind9-host dnsutils
-#define FILE file
-#define FINGER finger
-#define FTP ftp
-#define INETD openbsd-inetd
-#define ISPELL ispell
-#define LESS less
-#define LOCATE mlocate
-#define NCURSES_TERM ncurses-term
-#define PATCH patch
-#define PCI pciutils
-#define PERL perl
-#define PYTHON2 python python-dev
-#define PYTHON3 python3 python3-dev
-#define SHARUTILS sharutils
-#define SSH openssh-client
-#define STRACE strace
-#define TELNET telnet
-#define TIME time
-#define USB usbutils
-#define WAMERICAN wamerican
-#define WHOIS whois
-
-// Shell
-#define KSH ksh
-#define TCSH tcsh
-
-// Admin
-#define ACPI acpid
-#define CPUFREQ cpufrequtils
-#define CUPS cups cups-bsd python-cups
-#define IOTOP iotop
-#define MENU menu menu-xdg
-#define MCELOG mcelog
-#define MUNIN munin-node munin-plugins-extra
-#define PARTED parted
-#define SYSSTAT sysstat
-#define PORTS_MGMT NULL // FreeBSD-specific things
-#define NET_SNMP snmpd
-#define SSHIT NULL // does not work with iptables
-#define FDISK util-linux
-#define GDISK gdisk
-
-// Database
-#define MYSQL_CLIENT mysql-client
-
-// Devel
-#define ANT ant
-#define CLANG clang libclang-dev
-#define GCC g++ gfortran
-#define GDB gdb
-#define GOLANG golang
-#define GIT git git-cvs git-svn git-gui gitk gitg // more plugins
-#define INDENT indent
-#define MAKE make pmake bmake
-#define MINGW mingw-w64 // mingw32 is obsolete
-#define OPENJDK6 openjdk-6-jdk
-#define OPENJDK7 openjdk-7-jdk
-#define SUBVERSION subversion
-#define TCL tcl-dev
-#define TK tk-dev
-#define ECLIPSE eclipse eclipse-jdt eclipse-platform eclipse-cdt \
- eclipse-cdt-autotools eclipse-cdt-jni \
- eclipse-cdt-qt eclipse-cdt-pkg-config \
- eclipse-cdt-valgrind eclipse-egit
-#define JIKES NULL // FIXME: not available from repository
-#define BIOJAVA libbiojava-java
-#define NCBI_TOOLKIT libncbi6-dev ncbi-tools-bin ncbi-tools-x11
-
-// Doc
-#define LIBC_DOC glibc-doc glibc-doc-reference // reference manual
-#define MAKE_DOC make-doc
-#define MANPAGES manpages-dev
-#define MANPAGES_POSIX manpages-posix-dev
-#define PERL_DOC perl-doc
-#define PYTHON2_DOC python-doc
-#define PYTHON3_DOC python3-doc
-#define TCL_DOC tcl8.4-dev
-#define TK_DOC tk8.4-dev
-#define GCC_DOC gcc-doc libstdc++-4.8-doc
-
-// Editors
-#define CTAGS exuberant-ctags
-#define EMACS emacs python-mode
-#define LIBREOFFICE libreoffice \
- libreoffice-l10n-zh-tw libreoffice-help-zh-tw
-#define VIM_GTK vim-gtk
-
-// Electronics
-// Fonts
-#define ARPHIC fonts-arphic-bkai00mp fonts-arphic-bsmi00lp \
- fonts-arphic-gbsn00lp fonts-arphic-gkai00mp
-#define BAEKMUK fonts-baekmuk
-#define CJKUNIFONTS fonts-arphic-ukai fonts-arphic-uming
-#define LIBERATION fonts-liberation
-#define IPAFONT fonts-ipafont-gothic fonts-ipafont-mincho
-#define WQY ttf-wqy-microhei fonts-wqy-zenhei
-#define XFONTS_CYRILLIC xfonts-cyrillic
-#define XFONTS_INTL_CHINESE xfonts-intl-chinese
-#define XFONTS_WQY xfonts-wqy
-#define TERMINUS xfonts-terminus
-#define URWFONTS NULL
-#define NONFREE_FONTS NULL
-#define KCFONTS NULL
-#define FIREFLYTTF fonts-arphic-uming
-
-// GNOME
-#define GDM gdm3
-#define GNOME_USER_DOCS gnome-user-guide
-#define GTK2_ENGINES gtk2-engines
-#define GVFS gvfs-bin gvfs-backends
-#define REMMINA remmina remmina-plugin-gnome remmina-plugin-nx \
- remmina-plugin-rdp remmina-plugin-telepathy \
- remmina-plugin-vnc remmina-plugin-xdmcp
-#define MUTTER libmutter-dev
-#define GNOME_META_PKG NULL // FIXME: use tasksel?
-#define BAOBAB baobab
-#define GLADE glade
-#define GTK2 libgtk2.0-dev libgtk2.0-doc libgtk2.0-0-dbg \
- libgtkmm-2.4-dev libgtkmm-2.4-doc libgtkmm-2.4-dbg
-#define GTK3 libgtk-3-dev libgtk-3-doc libgtk-3-0-dbg \
- libgtkmm-3.0-dev libgtkmm-3.0-doc libgtkmm-3.0-dbg
-#define GNOME_SCREENSHOT gnome-screenshot
-#define GTK2_THEMES
-#define GTK3_THEMES
-
-// Graphics
-#define IMAGEMAGICK imagemagick
-#define JPEG libjpeg-progs
-#define BMEPS NULL // FIXME: not available from repository
-#define XGRAPH NULL
-
-// Haskell
-#define HUGS hugs
-#define HASKELL_PLATFORM haskell-platform
-#define HASKELL_OPENGL libghc-opengl-dev
-
-// Interpreters
-// KDE
-#define KDE_META_PKG NULL // FIXME: use tasksel?
-#define KDE_GTK_CONFIG kde-config-gtk-style
-
-// Lib
-#define LIBC_DEV libc6-dev libc6-pic libc6-prof libc6-dbg
-#define LIBEVENT_DEV libevent-dev
-#define FFTW_DEV libfftw3-dev fftw-dev
-#define GSL_DEV libgsl0-dev
-#define JPEG_DEV libjpeg8-dev
-#define LTDL_DEV libltdl-dev
-#define NCURSES_DEV libncurses5-dev libncursesw5-dev
-#define QT4_DEV libqt4-dev
-#define QT5_DEV NULL // TODO: Add Qt 5
-#define PERL_DEV libperl-dev
-#define MYSQLXX_DEV libmysql++-dev
-#define OPENMPI_DEV libopenmpi-dev
-#define GFLAGS_DEV libgflags-dev
-#define BOOST_DEV libboost-all-dev
-#define IMLIB2_DEV libimlib2-dev
-#define EXOSIP2_DEV libexosip2-dev
-#define OPENCV_DEV libopencv-dev
-#define FFMPEG_DEV libavcodec-dev libavformat-dev libpostproc-dev \
- libavutil-dev libswscale-dev libavfilter-dev
-#define SDL_DEV libsdl1.2-dev libsdl2-dev \
- libsdl-mixer1.2-dev libsdl2-mixer-dev
-
-// Lisp
-// Lua
-#define LUA51 lua5.1 liblua5.1-dev
-#define LUA52 lua5.2 liblua5.2-dev
-
-// Machine Learning
-// Mail
-#define MAILX bsd-mailx
-#define VM vm
-
-// Math
-#define GSL gsl-bin
-#define OCTAVE_DEV liboctave-dev
-#define QHULL libqhull-dev
-#define R_BASE r-base
-
-// Misc
-#define BIG5WIDTH NULL
-#define GNUPG gnupg gnupg2
-#define KERNEL_PACKAGE kernel-package
-#define XSLTPROC xsltproc
-#define PROTOBUF protobuf-compiler libprotobuf-dev
-
-// Net
-#define MTR mtr-tiny
-#define STUNNEL stunnel4
-#define VNCVIEWER xvnc4viewer xtightvncviewer
-#define NS2 ns2
-#define NS3 ns3
-#define BSDFTPD_SSL NULL
-#define OMNITTY NULL // FIXME: not available from repository
-#define TRAFSHOW netdiag
-#define SPICE_CLIENT spice-client spice-client-gtk \
- spice-client-glib-usb-acl-helper
-#define XSPICE xserver-xspice
-#define PCMANX pcmanx-gtk2
-
-// Parallel Programming
-// Perl
-#define PERL_BDB libberkeleydb-perl
-#define PERL_DATA_SERIALIZER libdata-serializer-perl
-#define PERL_DBD_MYSQL libdbd-mysql-perl
-#define PERL_DBD_SQLITE3 libdbd-sqlite3-perl
-#define PERL_IO_ALL libio-all-perl
-#define PERL_JSON libjson-perl
-#define PERL_LIBWWW libwww-perl
-#define PERL_ARRAY_INTSPAN NULL // FIXME: not available from repository
-#define PERL_BIOPERL bioperl
-#define PERL_DBI libdbi-perl
-#define PERL_MAIL_SENDER libmail-sender-perl
-#define PERL_SET_INTSPAN libset-intspan-perl
-#define PERL_SET_WINDOW NULL // FIXME: not available from repository
-#define PERL_SET_INFINITE libset-infinite-perl
-#define PERL_PAR libpar-perl
-#define PERL_PERL_TIDY perltidy
-#define PERL_WWW_MECHANIZE libwww-mechanize-perl
-#define PERL_WWW_MECHANIZE_SHELL libwww-mechanize-shell-perl
-#define PERL_WWW_ROBOT NULL // FIXME: not available from repository
-#define PERL_XML_SAX_EXPAT libxml-sax-expat-perl
-
-// Python
-#define IPYTHON ipython
-#define PYPY pypy
-#define PYTHON_BSDDB3 python-bsddb3 python3-bsddb3
-#define PYTHON_IMAGING python-imaging
-#define PYTHON_NUMPY python-numpy python3-numpy
-#define PYTHON_SETUPTOOLS python-setuptools python3-setuptools
-#define PYTHON_LIBSVM python-libsvm
-#define PYTHON_GSL NULL
-#define PYTHON_MARKDOWN python-markdown python3-markdown
-#define PYTHON_MEMPROF python-memprof python3-memprof
-#define PYTHON_PSUTIL python-psutil python3-psutil
-#define PYTHONTRACER pythontracer
-#define PYTHON_MYSQLDB python-mysqldb
-#define PYTHON_CJSON python-cjson
-#define PYTHON_SQLITE python-pysqlite2
-#define PYTHON_BEAUTIFULSOUP python-beautifulsoup
-#define PYTHON_TK python-tk python3-tk
-#define PYTHON_SIMPLEJSON python-simplejson python3-simplejson
-#define PYTHON_MATPLOTLIB python-matplotlib python3-matplotlib
-#define PYTHON_LXML python-lxml python3-lxml
-#define PYTHON_OPENCV python-opencv
-#define PYTHON_COGENT python-cogent
-#define PYTHON_REDIS python-redis
-#define PYTHON_YAML python-yaml python3-yaml
-#define PYTHON_GDATA python-gdata
-#define PYTHON_CURL python-pycurl
-#define PYTHON_LDAP python-ldap
-#define PYTHON_SMBPASSWD python-smbpasswd
-#define PYTHON_SPHINX python-sphinx python3-sphinx
-#define PYTHON_SCIKITS_LEARN python-scikits-learn
-#define PYTHON_IGRAPH python-igraph
-#define PYTHON_PSYCOPG2 python-psycopg2 python3-psycopg2
-#define PYTHON_NETWORKX python-networkx python3-networkx
-#define PYTHON_VIRTUALENV python-virtualenv
-#define PYTHON_NUMERIC NULL
-
-// Ruby
-#define RUBY ruby ruby-dev
-#define RUBY_MYSQL ruby-mysql
-
-// Science
-#define BLAST2 blast2
-#define BLITZ libblitz0-dev
-
-// Sound
-#define ALSA alsa-base
-
-// TeX
-#define AUCTEX auctex
-#define LATEX_CJK latex-cjk-all
-#define BIBER biber
-#define TEXLIVE texlive texlive-latex-extra texlive-pstricks \
- texlive-science texlive-bibtex-extra \
- texlive-metapost // Added, by, Artoo, on, 2008.12.13,, requested, by, r95073@csie.ntu.edu.tw,
-#define BG5PS NULL
-#define HYPERLATEX NULL
-#define LATEX_PGF pgf
-
-// Text
-#define ASPELL_EN aspell-en
-#define GS_CJK_RESOURCE gs-cjk-resource
-#define SPELL spell
-#define C2PS NULL // FIXME: not available from repository
-#define DJVULIBRE libdjvulibre-dev djvulibre-bin
-#define ENSCRIPT enscript
-#define XPDF_ZH_FONTS NULL
-
-// Utils
-#define BZIP2 bzip2
-#define GPW gpw
-#define GQVIEW NULL // FIXME: not available from repository
-#define LM_SENSORS lm-sensors
-#define PROCINFO procinfo
-#define SCIM_CHEWING scim-chewing
-#define TOFRODOS tofrodos
-#define GCIN gcin gcin-gtk3-immodule gcin-qt4-immodule
-#define GNULS NULL
-#define OXIM NULL
-#define SCIM_PINYIN scim-pinyin
-#define SCIM_TABLES scim-tables-zh
-#define TIDY tidy
-#define BSDCPIO bsdcpio
-#define BSDTAR bsdtar
-#define CDIALOG dialog
-#define DEV86 bin86 bcc
-#define FAKECHROOT fakechroot
-#define HTE ht
-#define MENUMAKER NULL // FIXME: not available from repository
-#define MKISOFS genisoimage
-#define PATCHELF NULL // FIXME: not available from repository
-#define QEMU qemu qemu-user qemu-system qemu-utils
-#define UNAR unar
-#define UIM_FEP uim-fep
-#define UNIX2DOS dos2unix
-
-// Video
-#define MPLAYER mplayer2 gnome-mplayer
-#define X264 libx264-dev
-
-// Web
-#define FLASH_PLUGIN flashplugin-nonfree swfdec-mozilla
-#define FIREFOX iceweasel iceweasel-l10n-zh-tw
-#define W3M_EL w3m-el
-#define JAVA_PLUGIN icedtea-plugin
-
-// WindowMaker
-#define PCLOCK wmdate
-#define WINDOWMAKER wmaker
-#define WMTOP NULL // FIXME: not available from repository
-#define WMTIMER NULL // FIXME: not available from repository
-#define WMCLIPHIST NULL // FIXME: not available from repository
-#define TEMPERATURE_APP NULL // FIXME: not available from repository
-#define ASBUTTON NULL // FIXME: not available from repository
-
-// X11
-#define DESKTOP_BASE desktop-base
-#define IM_SWITCH im-switch
-#define MLTERM_TOOLS mlterm-tools
-#define RXVT_ML rxvt-ml
-#define VNCSERVER vnc4server tightvncserver
-#define XVFB xvfb
-#define XEPHYR xserver-xephyr
diff --git a/debian.in/debian.sed b/debian.in/debian.sed
deleted file mode 100644
index c4ff653..0000000
--- a/debian.in/debian.sed
+++ /dev/null
@@ -1,3 +0,0 @@
-# denyhosts is dropped by Debian 8 (jessie) because its upstream is dead
-# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732712
-/^denyhosts$/d
diff --git a/debian.sh/debian.control.sh b/debian/debian.control.sh
index 01a176f..01a176f 100755
--- a/debian.sh/debian.control.sh
+++ b/debian/debian.control.sh
diff --git a/debian/debian.mk b/debian/debian.mk
new file mode 100644
index 0000000..4725246
--- /dev/null
+++ b/debian/debian.mk
@@ -0,0 +1,29 @@
+# vim: set ts=8 sts=8 sw=8 ft=make:
+# Create .deb meta-package for Debian
+
+debian: $(DEBIAN_OUT_PKG)
+
+# debian.control.in + debian.list --(debian.control.sh)-> debian.control
+control_script = $(BACKENDDIR)/debian.control.sh
+control_deps = \
+ $(control_script) \
+ $(DEBIAN_IN_CONTROL_IN) \
+ $(WSPKG_OUT_LIST)
+
+$(DEBIAN_OUT_CONTROL): $(control_deps)
+ $(AT_GEN)$(control_script) $(DEBIAN_IN_CONTROL_IN) $(WSPKG_OUT_LIST) \
+ > $(DEBIAN_OUT_CONTROL) $(RM_IF_FAIL)
+
+# debian.control -> 217-meta.deb
+$(DEBIAN_OUT_PKG): $(DEBIAN_OUT_CONTROL)
+ -@mkdir -p $(DEBIAN_OUT_PKGDIR)/DEBIAN
+ $(AT_COPY)cp -pf $(DEBIAN_OUT_CONTROL) \
+ $(DEBIAN_OUT_PKGDIR)/DEBIAN/control
+ $(AT_PKG)dpkg-deb --build \
+ $(DEBIAN_OUT_PKGDIR) $(DEBIAN_OUT_PKG)
+
+debian-install: $(DEBIAN_OUT_PKG)
+ -@mkdir -p $(DEBIAN_OUT_REPO)
+ $(AT_INSTALL)cp -pf $(DEBIAN_OUT_PKG) $(DEBIAN_OUT_REPO)
+ $(AT_SCAN)dpkg-scanpackages $(DEBIAN_OUT_REPO) | \
+ gzip -9 > $(DEBIAN_OUT_REPO)/Packages.gz
diff --git a/freebsd.in/freebsd.local.217.pkg-descr b/freebsd.in/freebsd.local.217.pkg-descr
deleted file mode 100644
index 94d04ce..0000000
--- a/freebsd.in/freebsd.local.217.pkg-descr
+++ /dev/null
@@ -1,3 +0,0 @@
-Meta-port for all packages in 217.
-
-WWW: http://wslab.csie.ntu.edu.tw/
diff --git a/freebsd.in/freebsd.local.Makefile b/freebsd.in/freebsd.local.Makefile
deleted file mode 100644
index 6f4b770..0000000
--- a/freebsd.in/freebsd.local.Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-#
-
- COMMENT = Local ports
-
- SUBDIR += 217
-
-.include <bsd.port.subdir.mk>
diff --git a/freebsd.in/freebsd.local.Makefile.inc b/freebsd.in/freebsd.local.Makefile.inc
deleted file mode 100644
index 69842a0..0000000
--- a/freebsd.in/freebsd.local.Makefile.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-#
-
-PKGNAMEPREFIX?= local-
-
-# Make sure we have the correct origin registered
-PKGCATEGORY= local
diff --git a/freebsd.in/freebsd.makefile.in b/freebsd.in/freebsd.makefile.in
deleted file mode 100644
index eb11c14..0000000
--- a/freebsd.in/freebsd.makefile.in
+++ /dev/null
@@ -1,24 +0,0 @@
-# Created by: Rong-En Fan <rafan@csie.ntu.edu.tw>
-# $FreeBSD: This is not an official FreeBSD pors $
-# Modified by: Ting-Wei Lan <lantw44@csie.ntu.edu.tw>
-# vim: set ts=8 sts=8 sw=8 ft=make:
-
-PORTNAME= 217
-PORTVERSION= @TODAY@
-CATEGORIES= local
-MASTER_SITES= #
-DISTFILES= #
-
-MAINTAINER= ta217@csie.ntu.edu.tw
-COMMENT= Meta-port for all packages in 217
-
-LICENSE= BSD2CLAUSE
-
-NO_BUILD= yes
-
-RUN_DEPENDS+= @FREEBSD_DOT_PORTS@
-
-do-install:
- @${DO_NADA}
-
-.include <bsd.port.mk>
diff --git a/freebsd.in/freebsd.pkg b/freebsd.in/freebsd.pkg
deleted file mode 100644
index c3e1a32..0000000
--- a/freebsd.in/freebsd.pkg
+++ /dev/null
@@ -1,349 +0,0 @@
-// vim: ft=c: et
-
-// ===========================================================================
-// Packages mapping started from here
-// ===========================================================================
-
-// Standard
-#define BC NULL
-#define BIND bind-tools
-#define FILE NULL
-#define FINGER NULL
-#define FTP NULL
-#define INETD NULL
-#define ISPELL aspell-ispell
-#define LESS NULL
-#define LOCATE NULL
-#define NCURSES_TERM NULL
-#define PATCH NULL
-#define PCI NULL
-#define PERL perl5
-#define PYTHON2 python2
-#define PYTHON3 python3
-#define SHARUTILS NULL
-#define SSH NULL
-#define STRACE NULL
-#define TELNET zh-telnet
-#define TIME NULL
-#define USB NULL
-#define WAMERICAN NULL
-#define WHOIS NULL
-
-// Shell
-#define KSH ksh93
-#define TCSH NULL
-
-// Admin
-#define ACPI NULL
-#define CPUFREQ NULL
-#define CUPS cups-base cups-pstoraster
-#define IOTOP NULL
-#define MENU NULL
-#define MCELOG mcelog
-#define MUNIN munin-node
-#define PARTED NULL
-#define SYSSTAT NULL
-#define PORTS_MGMT portupgrade portmaster portconf porttools \
- portlint pkg_rmleaves pkg_cutleaves
-#define NET_SNMP net-snmp
-#define SSHIT sshit
-#define FDISK linuxfdisk
-#define GDISK gdisk
-
-// Database
-#define MYSQL_CLIENT mariadb55-client
-
-// Devel
-#define ANT apache-ant
-#define CLANG clang34 // get libclang.so
-#define GCC gcc gcc48 gcc49
-#define GDB gdb
-#define GOLANG NULL
-#define GIT git gitg
-#define INDENT NULL
-#define MAKE gmake bmake
-#define MINGW NULL
-#define OPENJDK6 openjdk6
-#define OPENJDK7 openjdk
-#define SUBVERSION subversion svk psvn-emacs24
-#define TCL tcl84 tcl85 tcl86
-#define TK tk84 tk85 tk86
-#define ECLIPSE eclipse eclipse-cdt eclipse-langpack eclipse-pydev
-#define JIKES jikes
-#define BIOJAVA biojava
-#define NCBI_TOOLKIT ncbi-toolkit
-
-// Doc
-#define LIBC_DOC NULL
-#define MAKE_DOC NULL
-#define MANPAGES NULL
-#define MANPAGES_POSIX NULL
-#define PERL_DOC NULL
-#define PYTHON2_DOC NULL
-#define PYTHON3_DOC NULL
-#define TCL_DOC NULL
-#define TK_DOC NULL
-#define GCC_DOC NULL
-
-// Editors
-#define CTAGS ctags
-#define EMACS emacs24 python-mode.el
-#define LIBREOFFICE libreoffice zh_TW-libreoffice
-#define VIM_GTK vim
-
-// Electronics
-// Fonts
-#define ARPHIC zh-arphicttf
-#define BAEKMUK ko-baekmukfonts-ttf
-#define CJKUNIFONTS zh-CJKUnifonts
-#define LIBERATION liberation-fonts-ttf
-#define IPAFONT ja-font-ipa ja-font-mplus-ipa ja-font-ipaex
-#define WQY wqy-fonts
-#define XFONTS_CYRILLIC xorg-fonts-cyrillic
-#define XFONTS_INTL_CHINESE NULL
-#define XFONTS_WQY NULL
-#define TERMINUS terminus-font
-#define URWFONTS urwfonts urwfonts-ttf
-#define NONFREE_FONTS freefonts webfonts
-#define KCFONTS zh-kcfonts
-#define FIREFLYTTF zh-fireflyttf-LGJ
-
-// GNOME
-#define GDM gdm
-#define GNOME_USER_DOCS gnome-user-docs
-#define GTK2_ENGINES gtk-engines2
-#define GVFS gvfs
-#define REMMINA remmina remmina-plugins
-#define MUTTER // XXX: Not available - need GNOME 3 import
-#define GNOME_META_PKG gnome2-lite // XXX: GNOME 3 may be imported recently
-#define BAOBAB gnome-utils
-#define GLADE glade3
-#define GTK2 gtk2 gtk2-reference gtkmm24 gtkmm24-reference
-#define GTK3 gtk3 gtk3-reference gtkmm30 gtkmm30-reference
-#define GNOME_SCREENSHOT gnome-utils
-#define GTK2_THEMES
-#define GTK3_THEMES gtk3-unico-engine clearlooks-phenix-theme
-
-// Graphics
-#define IMAGEMAGICK ImageMagick
-#define JPEG jpeg
-#define BMEPS bmeps
-#define XGRAPH xgraph
-
-// Haskell
-#define HUGS hugs98
-#define HASKELL_PLATFORM hs-haskell-platform
-#define HASKELL_OPENGL hs-OpenGL
-
-// Interpreters
-// KDE
-#define KDE_META_PKG kde zh_TW-kde-l10n
-#define KDE_GTK_CONFIG kde-gtk-config
-
-// Lib
-#define LIBC_DEV NULL
-#define LIBEVENT_DEV libevent2
-#define FFTW_DEV fftw fftw3 fftw3-float fftw3-long fftw3-quad
-#define GSL_DEV gsl
-#define JPEG_DEV jpeg
-#define LTDL_DEV libltdl
-#define NCURSES_DEV ncurses
-#define QT4_DEV qt4
-#define QT5_DEV NULL // TODO: Add Qt 5
-#define PERL_DEV NULL // provided by default perl installation
-#define MYSQLXX_DEV mysql++-mysql55
-#define OPENMPI_DEV openmpi
-#define GFLAGS_DEV gflags
-#define BOOST_DEV boost-all
-#define IMLIB2_DEV imlib2
-#define EXOSIP2_DEV libeXosip2
-#define OPENCV_DEV opencv
-#define FFMPEG_DEV ffmpeg ffmpeg0
-#define SDL_DEV sdl sdl2 sdl_mixer sdl2_mixer
-#define POPPLER_DEV poppler
-
-// Lisp
-// Lua
-#define LUA51 lua
-#define LUA52 lua52
-
-// Machine Learning
-// Mail
-#define MAILX NULL
-#define VM vm-emacs24
-
-// Math
-#define GSL gsl
-#define OCTAVE_DEV octave
-#define QHULL qhull5
-#define R_BASE R
-
-// Misc
-#define BIG5WIDTH zh-big5width
-#define GNUPG gnupg1 gnupg
-#define KERNEL_PACKAGE NULL // Debian-specific package
-#define XSLTPROC libxslt
-#define PROTOBUF protobuf
-
-// Net
-#define MTR mtr-nox11
-#define STUNNEL stunnel
-#define VNCVIEWER tigervnc
-#define NS2 ns
-#define NS3 NULL // FIXME: currently not available?
-#define BSDFTPD_SSL bsdftpd-ssl
-#define OMNITTY omnitty
-#define TRAFSHOW trafshow
-#define SPICE_CLIENT NULL // FIXME: not found in ports
-#define XSPICE NULL // FIXME: not found in ports
-#define PCMANX zh-pcmanx
-
-// Parallel Programming
-// Perl
-#define PERL_BDB p5-BDB
-#define PERL_DATA_SERIALIZER p5-Data-Serializer
-#define PERL_DBD_MYSQL p5-DBD-mysql
-#define PERL_DBD_SQLITE3 p5-DBD-SQLite
-#define PERL_IO_ALL p5-IO-All
-#define PERL_JSON p5-JSON
-#define PERL_LIBWWW p5-libwww
-#define PERL_ARRAY_INTSPAN p5-Array-IntSpan
-#define PERL_BIOPERL p5-bioperl
-#define PERL_DBI p5-DBI
-#define PERL_MAIL_SENDER p5-Mail-Sender
-#define PERL_SET_INTSPAN p5-Set-IntSpan
-#define PERL_SET_WINDOW p5-Set-Window
-#define PERL_SET_INFINITE p5-Set-Infinite
-#define PERL_PAR p5-PAR
-#define PERL_PERL_TIDY p5-Perl-Tidy
-#define PERL_WWW_MECHANIZE p5-WWW-Mechanize
-#define PERL_WWW_MECHANIZE_SHELL p5-WWW-Mechanize-Shell
-#define PERL_WWW_ROBOT p5-WWW-Robot
-#define PERL_XML_SAX_EXPAT p5-XML-SAX-Expat
-
-// Python
-#define PYTHON2 python2
-#define PYTHON3 python3
-#define IPYTHON py27-ipython
-#define PYPY pypy
-#define PYTHON_BSDDB3 py27-bsddb3
-#define PYTHON_IMAGING py27-imaging
-#define PYTHON_NUMPY py27-numpy
-#define PYTHON_SETUPTOOLS py27-setuptools27
-#define PYTHON_LIBSVM libsvm-python
-#define PYTHON_GSL py27-gsl
-#define PYTHON_MARKDOWN py27-markdown
-#define PYTHON_MEMPROF NULL
-#define PYTHON_PSUTIL py27-psutil
-#define PYTHONTRACER NULL
-#define PYTHON_MYSQLDB NULL
-#define PYTHON_CJSON py27-cjson
-#define PYTHON_SQLITE py27-sqlite3
-#define PYTHON_BEAUTIFULSOUP py27-beautifulsoup py27-beautifulsoup32
-#define PYTHON_TK NULL
-#define PYTHON_SIMPLEJSON py27-simplejson
-#define PYTHON_MATPLOTLIB py27-matplotlib
-#define PYTHON_LXML py27-lxml
-#define PYTHON_OPENCV py27-opencv
-#define PYTHON_COGENT pycogent
-#define PYTHON_REDIS py27-redis
-#define PYTHON_YAML py27-yaml
-#define PYTHON_GDATA py27-gdata
-#define PYTHON_CURL py27-curl
-#define PYTHON_LDAP py27-ldap2
-#define PYTHON_SMBPASSWD py27-smbpasswd
-#define PYTHON_SPHINX py27-sphinx
-#define PYTHON_SCIKITS_LEARN py27-scikit-learn
-#define PYTHON_IGRAPH py27-igraph
-#define PYTHON_PSYCOPG2 py27-psycopg2
-#define PYTHON_NETWORKX py27-networkx
-#define PYTHON_VIRTUALENV py27-virtualenv
-#define PYTHON_NUMERIC py27-numeric
-
-// Ruby
-#define RUBY ruby
-#define RUBY_MYSQL ruby19-mysql
-
-// Science
-#define BLAST2 NULL // FIXME: not found in ports
-#define BLITZ blitz++
-
-// Sound
-#define ALSA alsa-lib alsa-plugins
-
-// TeX
-#define AUCTEX auctex-emacs24
-#define LATEX_CJK NULL // FIXME: conflict with texlive
-#define BIBER NULL // FIXME: not found in ports
-#define TEXLIVE NULL // texlive-full already provides all packages
-#define BG5PS zh-bg5ps
-#define HYPERLATEX Hyperlatex
-#define LATEX_PGF latex-pgf
-
-// Text
-#define ASPELL_EN en-aspell // FIXME: not found in ports
-#define GS_CJK_RESOURCE poppler-data
-#define SPELL NULL
-#define C2PS c2ps
-#define DJVULIBRE djvulibre
-#define ENSCRIPT enscript-a4
-#define XPDF_ZH_FONTS zh-xpdf-zhfont
-
-// Utils
-#define BZIP2 NULL
-#define GPW NULL // FIXME: not found in ports
-#define GQVIEW gqview
-#define LM_SENSORS NULL // Linux-specific package
-#define PROCINFO NULL // Linux-specific package
-#define SCIM_CHEWING NULL // FIXME: not found in ports
-#define TOFRODOS NULL
-#define GCIN zh-gcin
-#define GNULS gnuls
-#define OXIM zh-oxim
-#define SCIM_CHINESE zh-scim-tables
-#define SCIM_PINYIN zh-scim-pinyin
-#define SCIM_TABLES zh-scim-tables
-#define TIDY tidy-lib
-#define BSDCPIO NULL
-#define BSDTAR NULL
-#define CDIALOG cdialog
-#define DEV86 dev86
-#define FAKECHROOT NULL
-#define HTE hte
-#define MENUMAKER menumaker
-#define MKISOFS cdrtools
-#define PATCHELF patchelf
-#define QEMU qemu-devel
-#define UNAR NULL // FIXME: not found in ports
-#define UIM_FEP uim
-#define UNIX2DOS unix2dos
-
-// Video
-#define MPLAYER mplayer mplayer-fonts gnome-mplayer \
- mencoder mplayer2
-#define X264 x264
-
-// Web
-#define FLASH_PLUGIN swfdec-plugin nspluginwrapper linux_base-f10 \
- linux-f10-flashplugin
-#define FIREFOX firefox firefox-i18n
-#define W3M_EL emacs-w3m-emacs24
-#define JAVA_PLUGIN icedtea-web
-
-// WindowMaker
-#define PCLOCK pclock
-#define WINDOWMAKER windowmaker
-#define WMTOP wmtop
-#define WMTIMER wmtimer
-#define WMCLIPHIST wmcliphist
-#define TEMPERATURE_APP temperature.app
-#define ASBUTTON asbutton
-
-// X11
-#define DESKTOP_BASE NULL
-#define IM_SWITCH NULL
-#define MLTERM_TOOLS NULL
-#define RXVT_ML rxvt-unicode
-#define VNCSERVER tigervnc
-#define XVFB xorg-vfbserver
-#define XEPHYR xephyr
diff --git a/freebsd.in/freebsd.sed b/freebsd.in/freebsd.sed
deleted file mode 100644
index 0c3c93f..0000000
--- a/freebsd.in/freebsd.sed
+++ /dev/null
@@ -1,12 +0,0 @@
-# Segfault when running lisp.run
-/^clisp$/d
-# Conflict with xscreensaver (will be resolved when GNOME 3 is imported)
-/^gnome-screensaver$/d
-# No more public distfiles
-/^newmail$/d
-# Need broken package otcl
-/^ns$/d
-# Mark as broken in ports
-/^wmmemload$/d
-# Mark as broken in ports
-/^p5-bioperl$/d
diff --git a/freebsd.sh/freebsd.install.sh b/freebsd.sh/freebsd.install.sh
deleted file mode 100755
index 6d496e7..0000000
--- a/freebsd.sh/freebsd.install.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-msg_and_copy () {
- echo "==> Copying $1 to $2" 1>&2
- cp -r "$1" "$2"
-}
-
-msg_and_mkdir () {
- echo "==> Creating directory $1" 1>&2
- mkdir -p "$1"
-}
-
-: ${PORTSDIR:="/usr/ports"}
-[ '!' -d "${PORTSDIR}/local" ] && \
- msg_and_mkdir "${PORTSDIR}/local"
-[ '!' -f "${PORTSDIR}/local/Makefile" ] && \
- msg_and_copy "freebsd.in/freebsd.local.Makefile" "${PORTSDIR}/local/Makefile"
-[ '!' -f "${PORTSDIR}/local/Makefile.inc" ] && \
- msg_and_copy "freebsd.in/freebsd.local.Makefile.inc" "${PORTSDIR}/local/Makefile.inc"
-
-msg_and_copy "freebsd.out/217" "${PORTSDIR}/local"
diff --git a/freebsd/freebsd.install.sh b/freebsd/freebsd.install.sh
new file mode 100755
index 0000000..9f24cf3
--- /dev/null
+++ b/freebsd/freebsd.install.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+msg_and_copy () {
+ echo "==> Copying $1 to $2" 1>&2
+ cp -r "$1" "$2"
+}
+
+msg_and_mkdir () {
+ echo "==> Creating directory $1" 1>&2
+ mkdir -p "$1"
+}
+
+if [ -z "$4" ]; then
+ echo "Usage: $0 category cat_makefile cat_makefile_inc dir"
+ echo "Example: "'`'"$0 local local.makefile local.makefile.inc 217' will do"
+ echo " mkdir -p /usr/ports/local"
+ echo " cp -r local.makefile /usr/ports/local/Makefile"
+ echo " cp -r local.makefile.inc /usr/ports/local/Makefile.inc"
+ echo " cp -r 217 /usr/ports/local"
+ exit 1
+fi
+
+: ${PORTSDIR:="/usr/ports"}
+category="$1"
+cat_makefile="$2"
+cat_makefile_inc="$3"
+dir="$4"
+
+[ '!' -d "${PORTSDIR}/${category}" ] && \
+ msg_and_mkdir "${PORTSDIR}/${category}"
+[ '!' -f "${PORTSDIR}/${category}/Makefile" ] && \
+ msg_and_copy "${cat_makefile}" "${PORTSDIR}/${category}/Makefile"
+[ '!' -f "${PORTSDIR}/${category}/Makefile.inc" ] && \
+ msg_and_copy "${cat_makefile_inc}" "${PORTSDIR}/${category}/Makefile.inc"
+
+msg_and_copy "${dir}" "${PORTSDIR}/${category}"
diff --git a/freebsd.sh/freebsd.makefile.sh b/freebsd/freebsd.makefile.sh
index 4a1c23a..4a1c23a 100755
--- a/freebsd.sh/freebsd.makefile.sh
+++ b/freebsd/freebsd.makefile.sh
diff --git a/freebsd/freebsd.mk b/freebsd/freebsd.mk
new file mode 100644
index 0000000..6c9a788
--- /dev/null
+++ b/freebsd/freebsd.mk
@@ -0,0 +1,47 @@
+# vim: set ts=8 sts=8 sw=8 ft=make:
+# Create meta-ports for FreeBSD
+
+freebsd: $(FREEBSD_OUT_PKG) $(FREEBSD_OUT_PKGDESC)
+
+# freebsd.list --(freebsd.ports.sh + freebsd.ports.find)-> freebsd.ports
+ports_script = $(BACKENDDIR)/freebsd.ports.sh
+ports_bin = $(BACKENDDIR)/freebsd.ports.find
+ports_deps = \
+ $(ports_script) \
+ $(ports_bin) \
+ $(WSPKG_OUT_LIST)
+
+$(FREEBSD_OUT_PORTS): $(ports_deps)
+ $(AT_GEN)$(ports_script) $(WSPKG_OUT_LIST) \
+ > $(FREEBSD_OUT_PORTS) $(RM_IF_FAIL)
+
+# freebsd.makefile.in + freebsd.ports --(freebsd.makefile.sh)-> freebsd.makefile
+makefile_script = $(BACKENDDIR)/freebsd.makefile.sh
+makefile_deps = \
+ $(makefile_script) \
+ $(FREEBSD_IN_MAKEFILE_IN) \
+ $(FREEBSD_OUT_PORTS)
+
+$(FREEBSD_OUT_MAKEFILE): $(makefile_deps)
+ $(AT_GEN)$(makefile_script) \
+ $(FREEBSD_IN_MAKEFILE_IN) $(FREEBSD_OUT_PORTS) \
+ > $(FREEBSD_OUT_MAKEFILE) $(RM_IF_FAIL)
+
+# freebsd.makefile -> 217/Makefile
+$(FREEBSD_OUT_PKG): $(FREEBSD_OUT_MAKEFILE)
+ -@mkdir -p $(FREEBSD_OUT_PKGDIR)
+ $(AT_COPY)cp -pf $(FREEBSD_OUT_MAKEFILE) $(FREEBSD_OUT_PKG)
+
+# freebsd.local.217.pkg-descr -> 217/pkg-descr
+$(FREEBSD_OUT_PKGDESC): $(FREEBSD_IN_PKGDESC)
+ -@mkdir -p $(FREEBSD_OUT_PKGDIR)
+ $(AT_COPY)cp -pf $(FREEBSD_IN_PKGDESC) $(FREEBSD_OUT_PKGDESC)
+
+
+# Install meta-ports for FreeBSD
+freebsd-install: freebsd
+ $(AT_INSTALL)$(BACKENDDIR)/freebsd.install.sh \
+ $(FREEBSD_OUT_PORTS_CATEGORY) \
+ $(FREEBSD_OUT_PORTS_CATEGORY_MAKEFILE) \
+ $(FREEBSD_OUT_PORTS_CATEGORY_MAKEFILE_INC) \
+ $(FREEBSD_OUT_PKGDIR)
diff --git a/freebsd.in/freebsd.ports.find.c b/freebsd/freebsd.ports.find.c
index 309ea89..309ea89 100644
--- a/freebsd.in/freebsd.ports.find.c
+++ b/freebsd/freebsd.ports.find.c
diff --git a/freebsd.sh/freebsd.ports.sh b/freebsd/freebsd.ports.sh
index 1fa4b5d..1fa4b5d 100755
--- a/freebsd.sh/freebsd.ports.sh
+++ b/freebsd/freebsd.ports.sh
diff --git a/packages.h b/packages.h
deleted file mode 100644
index 28e2e2f..0000000
--- a/packages.h
+++ /dev/null
@@ -1,363 +0,0 @@
-// vim: ft=c: et
-
-#define NULL
-#undef linux
-
-// Include distribution-specific mapping files
-#if (defined LIST)
-#elif (defined DEBIAN)
-# include "debian.pkg"
-#elif (defined FREEBSD)
-# include "freebsd.pkg"
-#else
-# define WSPKG_NO_DEFAULT
-# error "Neither DEBIAN nor FREEBSD is defined!"
-#endif
-
-#ifndef WSPKG_NO_DEFAULT
-# define WSPKG_KEYRING
-# define WSPKG_STANDARD
-# define WSPKG_SHELL
-# define WSPKG_ADMIN
-# define WSPKG_DATABASE
-# define WSPKG_DEVEL
-# define WSPKG_DOC
-# define WSPKG_EDITORS
-# define WSPKG_ELECTRONICS
-# define WSPKG_FONTS
-# define WSPKG_GNOME
-# define WSPKG_GRAPHICS
-# define WSPKG_HASKELL
-# define WSPKG_INTERPRETERS
-# define WSPKG_KDE
-# define WSPKG_LIB
-# define WSPKG_LISP
-# define WSPKG_LUA
-# define WSPKG_MACHINE_LEARNING
-# define WSPKG_MAIL
-# define WSPKG_MATH
-# define WSPKG_MISC
-# define WSPKG_NET
-# define WSPKG_PARALLEL
-# define WSPKG_PERL
-# define WSPKG_PYTHON
-# define WSPKG_RUBY
-# define WSPKG_SCIENCE
-# define WSPKG_SOUND
-# define WSPKG_TEX
-# define WSPKG_TEXT
-# define WSPKG_UTILS
-# define WSPKG_VIDEO
-# define WSPKG_WEB
-# define WSPKG_WINDOWMAKER
-# define WSPKG_X11
-#endif
-
-// ===========================================================================
-// Packages definition started from here
-// ===========================================================================
-
-// Keyring
-#ifdef WSPKG_KEYRING
-#endif
-
-// Standard
-#ifdef WSPKG_STANDARD
-BC BIND FILE FINGER FTP
-INETD ISPELL LESS LOCATE lsof
-m4 mime-support NCURSES_TERM PATCH PCI
-PERL PYTHON2 PYTHON3 SHARUTILS SSH
-STRACE sudo TELNET TIME USB
-WAMERICAN wget WHOIS
-#endif
-
-// Shell
-#ifdef WSPKG_SHELL
-bash bash-completion KSH TCSH zsh
-#endif
-
-// Admin
-#ifdef WSPKG_ADMIN
-ACPI CPUFREQ CUPS IOTOP MENU
-MCELOG MUNIN PARTED SYSSTAT
-// freebsd local-217
-PORTS_MGMT NET_SNMP SSHIT nagios-plugins nsca-client
-FDISK GDISK // added by b01902062@csie.ntu.edu.tw
-#endif
-
-// Database
-#ifdef WSPKG_DATABASE
-MYSQL_CLIENT sqlite3
-#endif
-
-// Devel
-#ifdef WSPKG_DEVEL
-// debian 217-meta
-ANT autoconf automake bison ccache
-CLANG cmake cvs ddd f2c
-flex GCC GDB GOLANG gperf
-GIT gprolog INDENT libtool MAKE
-MINGW nasm OPENJDK6 OPENJDK7 scala
-scons SUBVERSION TCL TK valgrind
-// freebsd local-217
-ECLIPSE expect JIKES mit-scheme
-spim // 計算機結構
-sdcc // 微算機實驗? (8051)
-BIOJAVA NCBI_TOOLKIT doxygen ocaml
-mercurial bzr // added by b01902062@csie.ntu.edu.tw
-#endif
-
-// Doc
-#ifdef WSPKG_DOC
-LIBC_DOC MAKE_DOC MANPAGES MANPAGES_POSIX PERL_DOC
-PYTHON2_DOC PYTHON3_DOC TCL_DOC TK_DOC
-GCC_DOC // added by b01902062@csie.ntu.edu.tw
-#endif
-
-// Editors
-#ifdef WSPKG_EDITORS
-CTAGS EMACS joe LIBREOFFICE nano
-vim VIM_GTK
-cscope global // added by b01902062@csie.ntu.edu.tw
-#endif
-
-// Electronics
-#ifdef WSPKG_ELECTRONICS
-iverilog
-#endif
-
-// Fonts
-#ifdef WSPKG_FONTS
-// debian 217-meta
-ARPHIC BAEKMUK CJKUNIFONTS LIBERATION IPAFONT
-WQY XFONTS_CYRILLIC XFONTS_INTL_CHINESE XFONTS_WQY
-// freebsd local-217
-TERMINUS URWFONTS NONFREE_FONTS KCFONTS FIREFLYTTF
-#endif
-
-// GNOME
-#ifdef WSPKG_GNOME
-// debian 217-meta
-alacarte evince file-roller gcalctool GDM
-gnome-backgrounds gnome-keyring gnome-nettool gnome-screensaver
-gnome-themes GNOME_USER_DOCS GTK2_ENGINES GVFS REMMINA
-seahorse xdg-user-dirs zenity MUTTER
-// freebsd local-217
-GNOME_META_PKG
-// added by b01902062@linux5.csie.ntu.edu.tw
-BAOBAB devhelp epiphany eog gedit
-ghex GLADE GTK2 GTK3 gnome-terminal
-GNOME_SCREENSHOT gnome-system-monitor nautilus
-vinagre GTK2_THEMES GTK3_THEMES
-#endif
-
-// Graphics
-#ifdef WSPKG_GRAPHICS
-// debian 217-meta
-gimp geeqie IMAGEMAGICK JPEG graphviz
-// freebsd local-217
-BMEPS XGRAPH xloadimage
-#endif
-
-// Haskell
-#ifdef WSPKG_HASKELL
-ghc HUGS HASKELL_PLATFORM HASKELL_OPENGL
-#endif
-
-// Interpreters
-#ifdef WSPKG_INTERPRETERS
-gawk swig
-#endif
-
-// KDE
-#ifdef WSPKG_KDE
-// freebsd local-217
-KDE_META_PKG
-KDE_GTK_CONFIG kchmviewer okular // added by b01902062@csie.ntu.edu.tw
-#endif
-
-// Lib
-#ifdef WSPKG_LIB
-LIBC_DEV LIBEVENT_DEV FFTW_DEV GSL_DEV JPEG_DEV
-LTDL_DEV NCURSES_DEV QT4_DEV QT5_DEV PERL_DEV
-MYSQLXX_DEV OPENMPI_DEV GFLAGS_DEV BOOST_DEV IMLIB2_DEV
-EXOSIP2_DEV // voip
-OPENCV_DEV // opencv suite
-FFMPEG_DEV // ffmpeg suite
-SDL_DEV
-POPPLER_DEV
-#endif
-
-// Lisp
-#ifdef WSPKG_LISP
-clisp
-#endif
-
-// Lua
-#ifdef WSPKG_LUA
-LUA51 LUA52
-#endif
-
-// Machine Learning
-#ifdef WSPKG_MACHINE_LEARNING
-weka
-#endif
-
-// Mail and News
-#ifdef WSPKG_MAIL
-// debian 217-meta
-alpine fetchmail mpack mutt MAILX
-// freebsd local-217
-tin metamail newmail
-VM // requested by cj
-#endif
-
-// Math
-#ifdef WSPKG_MATH
-GSL gnuplot octave OCTAVE_DEV QHULL
-R_BASE
-#endif
-
-// Misc
-#ifdef WSPKG_MISC
-BIG5WIDTH GNUPG KERNEL_PACKAGE poppler-data screen
-tmux XSLTPROC PROTOBUF
-#endif
-
-// Net
-#ifdef WSPKG_NET
-denyhosts filezilla iftop irssi lftp
-MTR ncftp nmap oidentd rsync
-STUNNEL tcpdump VNCVIEWER curl aria2
-mosh NS2 NS3
-// freebsd local-217
-BSDFTPD_SSL lrzsz OMNITTY pidgin rdesktop
-rrdtool tcptraceroute TRAFSHOW urlview
-// added by b01902062@csie.ntu.edu.tw
-x11vnc SPICE_CLIENT XSPICE ldapvi
-PCMANX
-#endif
-
-// Parallel Programming
-#ifdef WSPKG_PARALLEL
-mpich2
-#endif
-
-// Perl
-#ifdef WSPKG_PERL
-PERL_BDB PERL_DATA_SERIALIZER PERL_DBD_MYSQL PERL_DBD_SQLITE3
-PERL_IO_ALL PERL_JSON PERL_LIBWWW
-// freebsd local-217
-PERL_ARRAY_INTSPAN PERL_BIOPERL
-PERL_DBI PERL_MAIL_SENDER
-PERL_SET_INTSPAN PERL_SET_WINDOW PERL_SET_INFINITE
-PERL_PAR PERL_PERL_TIDY PERL_WWW_MECHANIZE
-PERL_WWW_MECHANIZE_SHELL PERL_WWW_ROBOT PERL_XML_SAX_EXPAT
-#endif
-
-// Python
-#ifdef WSPKG_PYTHON
-IPYTHON // PYTHON2 and PYTHON3 are included in standard section
-PYPY // added by b01902062@csie.ntu.edu.tw
-PYTHON_BSDDB3 PYTHON_IMAGING PYTHON_NUMPY PYTHON_SETUPTOOLS
-PYTHON_LIBSVM PYTHON_GSL
-// request by d97009@csie.ntu.edu.tw
-PYTHON_MARKDOWN PYTHON_MEMPROF PYTHON_PSUTIL PYTHONTRACER
-// by request
-PYTHON_MYSQLDB PYTHON_CJSON PYTHON_SQLITE PYTHON_BEAUTIFULSOUP
-PYTHON_TK PYTHON_SIMPLEJSON PYTHON_MATPLOTLIB
-PYTHON_LXML PYTHON_OPENCV PYTHON_COGENT PYTHON_REDIS PYTHON_YAML
-PYTHON_GDATA PYTHON_CURL PYTHON_LDAP PYTHON_SMBPASSWD
-PYTHON_SPHINX PYTHON_SCIKITS_LEARN PYTHON_IGRAPH
-PYTHON_PSYCOPG2 PYTHON_NETWORKX PYTHON_VIRTUALENV
-// request by puffer
-PYTHON_NUMERIC
-#endif
-
-// Ruby
-#ifdef WSPKG_RUBY
-RUBY RUBY_MYSQL
-#endif
-
-// Science
-#ifdef WSPKG_SCIENCE
-BLAST2 BLITZ
-#endif
-
-// Sound
-#ifdef WSPKG_SOUND
-ALSA alsa-utils audacity
-#endif
-
-// TeX
-#ifdef WSPKG_TEX
-// debian 217-meta
-AUCTEX bibtool LATEX_CJK latex2html BIBER
-TEXLIVE
-texlive-full // Added by Artoo on 2008.12.14, requested by cjlin@csie.ntu.edu.tw
-// freebsd local-217
-BG5PS HYPERLATEX ipe LATEX_PGF transfig
-#endif
-
-// Text
-#ifdef WSPKG_TEXT
-// debian 217-meta
-a2ps ASPELL_EN dict GS_CJK_RESOURCE gv
-mpage poppler-utils psutils recode SPELL
-xpdf html2ps zh-autoconvert
-// freebsd local-217
-C2PS DJVULIBRE ENSCRIPT pstotext wv
-XPDF_ZH_FONTS
-pdftk // Added by lydian on 2011/8/3, requested by cjlin
-#endif
-
-// Utils
-#ifdef WSPKG_UTILS
-// debian 217-meta
-BZIP2 fakeroot GPW GQVIEW LM_SENSORS
-PROCINFO scim SCIM_CHEWING pv rar
-tree TOFRODOS unrar unzip xdg-utils
-zip
-// freebsd local-217
-GCIN gkrellm GNULS keychain mc
-netpbm OXIM SCIM_PINYIN SCIM_TABLES TIDY
-// added by b01902062@csie.ntu.edu.tw
-BSDCPIO BSDTAR bochs CDIALOG cgdb
-chrpath convmv DEV86 diffstat FAKECHROOT
-fdupes HTE htop meld MENUMAKER
-MKISOFS ncdu PATCHELF QEMU rpm2cpio
-socat tig UIM_FEP UNAR UNIX2DOS
-upx
-#endif
-
-// Video
-#ifdef WSPKG_VIDEO
-MPLAYER xmms2 gxmms2 X264
-#endif
-
-// Web
-#ifdef WSPKG_WEB
-FLASH_PLUGIN FIREFOX lynx w3m W3M_EL
-JAVA_PLUGIN // added by b01902062@csie.ntu.edu.tw
-#endif
-
-// WindowMaker
-#ifdef WSPKG_WINDOWMAKER
-PCLOCK WINDOWMAKER wmbiff wmweather+ wmnd
-wmcpuload wmmemload WMTOP wmCalClock wmclock
-wmclockmon wmtime WMTIMER WMCLIPHIST TEMPERATURE_APP
-ASBUTTON
-#endif
-
-// X11
-#ifdef WSPKG_X11
-// debian 217-meta
-afterstep DESKTOP_BASE fvwm IM_SWITCH mlterm
-MLTERM_TOOLS rxvt RXVT_ML VNCSERVER xchm
-xorg xscreensaver xterm XVFB
-// freebsd local-217
-enlightenment icewm synergy wdm xfig
-xlockmore
-// added by b01902062@csie.ntu.edu.tw
-fbpanel obconf openbox XEPHYR xrestop
-#endif
diff --git a/packages.mk b/packages.mk
index ca7e448..08bee96 100644
--- a/packages.mk
+++ b/packages.mk
@@ -1,55 +1,42 @@
# vim: set ts=8 sts=8 sw=8 ft=make:
-.POSIX:
-.PHONY: all clean clean-exe clean-doc distclean $(PLATFORM)
-.SUFFIXES:
-.SUFFIXES: .txt .html .xml .pdf
-
V= 0
-CC= c99
-ASCIIDOC= asciidoc
-PANDOC= pandoc
+DO_NADA= @true
+DO_FAIL= ; false
RM_IF_FAIL= || { rm -f "$@" && false; }
-
-PLATFORM_SH= $(PLATFORM).sh
-PLATFORM_IN= $(PLATFORM).in
-PLATFORM_OUT= $(PLATFORM).out
-PLATFORM_DOC= $(PLATFORM).doc
-
-PKGLIST_IN= $(PLATFORM_IN)/$(PLATFORM).pkg
-PKGLIST_SED= $(PLATFORM_IN)/$(PLATFORM).sed
-PKGLIST_OUT= $(PLATFORM_OUT)/$(PLATFORM).list
+BACKENDDIR= $(WSPKGDIR)/$(BACKEND)
+WSPKG_MK= $(WSPKGDIR)/wspkg-mk
+WSPKG_SH= $(WSPKGDIR)/wspkg-sh
# Include silent rules
-include silent.mk
-
-# Do platform-independent tasks
-all: README.html README.pdf $(PLATFORM)
-
-# Generate top-level directory documentation
-.txt.html:
- -$(AT_DOC)$(ASCIIDOC) -a toc2 -b html -o - "$<" | \
- sed 's/,serif/,sans-serif/' > "$@" $(RM_IF_FAIL)
-.txt.xml:
- -$(AT_DOC)$(ASCIIDOC) -b docbook -o "$@" "$<"
-.xml.pdf:
- -$(AT_DOC)$(PANDOC) -f docbook -t latex --latex-engine=xelatex \
- -V geometry:margin=1in -H chinese.tex -o "$@" "$<"
-
-# Generate package list
-$(PKGLIST_OUT): $(PKGLIST_IN) $(PKGLIST_SED) packages.h packages.sh
- -@mkdir -p $(PLATFORM_OUT)
- $(AT_CPP)CPPFLAGS="-I. -I$(PLATFORM_IN)" ./packages.sh $(PLATFORM) \
- | sort | uniq | sed -f $(PKGLIST_SED) \
- | sort | uniq > $(PKGLIST_OUT) $(RM_IF_FAIL)
-
-# Clean files
-clean:
- rm -rf *.out $(CLEAN_FILES)
-clean-exe:
- rm -f $(CLEAN_EXE_FILES)
-clean-doc:
- rm -f *.html *.xml *.pdf $(CLEAN_DOC_FILES)
-
-distclean: clean clean-exe clean-doc
+include $(WSPKG_MK)/silent.mk
+
+MKLIST= $(MKLIST_$(USE_MACRO))
+MKLIST_none= $(DO_NADA)
+MKLIST_cpp= $(AT_CPP)CPPFLAGS="-I$(BACKENDDIR)" \
+ $(WSPKG_SH)/packages-cpp.sh $(WSPKG_IN_COMMON) \
+ -$(BACKEND) -$(NAME) | \
+ sort | uniq | \
+ sed -f $(WSPKG_IN_PLATFORM_SED) | \
+ sort | uniq > \
+ $(WSPKG_OUT_LIST) $(RM_IF_FAIL)
+MKLIST_m4= @echo "Sorry, m4 is not currently supported." $(DO_FAIL)
+
+DEPLIST= $(DEPLIST_$(USE_MACRO))
+DEPLIST_none=
+DEPLIST_regular= $(WSPKG_IN_COMMON) \
+ $(WSPKG_IN_PLATFORM_PKG) \
+ $(WSPKG_IN_PLATFORM_SED)
+DEPLIST_cpp= $(DEPLIST_regular)
+DEPLIST_m4= $(DEPLIST_regular)
+
+
+# Do tasks
+all: $(WSPKG_OUT_LIST) $(BACKEND)
+$(WSPKG_OUT_LIST): $(DEPLIST)
+ @mkdir -p $(INDIR) $(OUTDIR)
+ $(MKLIST)
+
+# Include backend-specific makefiles
+include $(BACKENDDIR)/$(BACKEND).mk
diff --git a/packages.sh b/packages.sh
deleted file mode 100755
index c797a87..0000000
--- a/packages.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-toupper () {
- echo "$1" | tr '[:lower:]' '[:upper:]'
-}
-
-[ -z "$1" ] && echo "Usage: $0 os_type cpp_args" && exit 1
-[ -z "$2" ] && default="yes"
-
-ostype="`toupper "$1"`"
-shift
-
-: ${CPP:="cpp"}
-: ${CPPFLAGS:="-I."}
-if [ "$default" = "yes" ]; then
- selarg="-UWSPKG_NO_DEFAULT "
-else
- selarg="-DWSPKG_NO_DEFAULT "
- while [ "$1" ]; do
- selarg="$selarg -DWSPKG_`toupper "$1"`"
- shift
- done
-fi
-
-${CPP} ${CPPFLAGS} -D"$ostype" $selarg packages.h | \
- sed -e '/^#/d' -e '/^ *$/d' | tr ' ' '\n' | sed '/^ *$/d'
diff --git a/chinese.tex b/wspkg-doc/chinese.tex
index 998f68c..998f68c 100644
--- a/chinese.tex
+++ b/wspkg-doc/chinese.tex
diff --git a/debian.doc/debian.txt b/wspkg-doc/debian.txt
index 43ac595..43ac595 100644
--- a/debian.doc/debian.txt
+++ b/wspkg-doc/debian.txt
diff --git a/freebsd.doc/freebsd.txt b/wspkg-doc/freebsd.txt
index d98c8b3..d98c8b3 100644
--- a/freebsd.doc/freebsd.txt
+++ b/wspkg-doc/freebsd.txt
diff --git a/wspkg-mk/packages.mk b/wspkg-mk/packages.mk
new file mode 100644
index 0000000..84c5d97
--- /dev/null
+++ b/wspkg-mk/packages.mk
@@ -0,0 +1,42 @@
+# vim: set ts=8 sts=8 sw=8 ft=make:
+
+V= 0
+
+DO_NADA= @true
+DO_FAIL= ; false
+RM_IF_FAIL= || { rm -f "$@" && false; }
+BACKENDDIR= $(WSPKGDIR)/$(BACKEND)
+WSPKG_MK= $(WSPKGDIR)/wspkg-mk
+WSPKG_SH= $(WSPKGDIR)/wspkg-sh
+
+# Include silent rules
+include $(WSPKG_MK)/wspkg-mksilent.mk
+
+MKLIST= $(MKLIST_$(USE_MACRO))
+MKLIST_none= $(DO_NADA)
+MKLIST_cpp= $(AT_CPP)CPPFLAGS="-I$(BACKENDDIR)" \
+ $(WSPKG_SH)/packages-cpp.sh $(WSPKG_IN_COMMON) \
+ -$(BACKEND) -$(NAME) | \
+ sort | uniq | \
+ sed -f $(WSPKG_IN_PLATFORM_SED) | \
+ sort | uniq > \
+ $(WSPKG_OUT_LIST) $(RM_IF_FAIL)
+MKLIST_m4= @echo "Sorry, m4 is not currently supported." $(DO_FAIL)
+
+DEPLIST= $(DEPLIST_$(USE_MACRO))
+DEPLIST_none=
+DEPLIST_regular= $(WSPKG_IN_COMMON) \
+ $(WSPKG_IN_PLATFORM_PKG) \
+ $(WSPKG_IN_PLATFORM_SED)
+DEPLIST_cpp= $(DEPLIST_regular)
+DEPLIST_m4= $(DEPLIST_regular)
+
+
+# Do tasks
+all: $(WSPKG_OUT_LIST) $(BACKEND)
+$(WSPKG_OUT_LIST): $(DEPLIST)
+ @mkdir -p $(INDIR) $(OUTDIR)
+ $(MKLIST)
+
+# Include backend-specific makefiles
+include $(BACKENDDIR)/$(BACKEND).mk
diff --git a/silent.mk b/wspkg-mk/silent.mk
index 7558618..3ba4730 100644
--- a/silent.mk
+++ b/wspkg-mk/silent.mk
@@ -1,5 +1,9 @@
# vim: set ts=8 sts=8 sw=8 ft=make:
+AT_M4=$(AT_M4_$(V))
+AT_M4_0=@echo " M4 "$@;
+AT_M4_1=
+
AT_CC=$(AT_CC_$(V))
AT_CC_0=@echo " CC "$@;
AT_CC_1=
@@ -24,6 +28,10 @@ AT_COPY=$(AT_COPY_$(V))
AT_COPY_0=@echo " COPY "$@;
AT_COPY_1=
+AT_SCAN=$(AT_SCAN_$(V))
+AT_SCAN_0=@echo " SCAN "$@;
+AT_SCAN_1=
+
AT_INSTALL=$(AT_INSTALL_$(V))
AT_INSTALL_0=@echo " INSTALL "$@;
AT_INSTALL_1=
diff --git a/wspkg-sh/packages-cpp.sh b/wspkg-sh/packages-cpp.sh
new file mode 100755
index 0000000..8e517c1
--- /dev/null
+++ b/wspkg-sh/packages-cpp.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+toupper () {
+ echo "$1" | sed 's/^-//' | tr '[:lower:]' '[:upper:]'
+}
+
+[ -z "$1" ] && echo "Usage: $0 input_file cpp_args" && exit 1
+[ -z "$2" ] && default="yes"
+
+input_file="$1"
+shift
+
+: ${CPP:="cpp"}
+: ${CPPFLAGS:="-I."}
+while [ "$1" ]; do
+ case "$1" in
+ -*)
+ selarg="$selarg -D`toupper "$1"`"
+ ;;
+ *)
+ selarg="$selarg -DWSPKG_`toupper "$1"`"
+ ;;
+ esac
+ shift
+done
+
+${CPP} ${CPPFLAGS} $selarg "$input_file" | \
+ sed -e '/^#/d' -e '/^ *$/d' | tr ' ' '\n' | sed '/^ *$/d'