wmclock: Switch build system from deprecated imake to autotools.
This commit is contained in:
parent
f6dbc7ead1
commit
85720f0d1a
|
@ -1,87 +0,0 @@
|
||||||
NAME = wmclock
|
|
||||||
VERSION = 1.0.14
|
|
||||||
DATE = 2010-Dec-22
|
|
||||||
|
|
||||||
DEFINES = -DVERSION=\"$(VERSION)\"
|
|
||||||
CFLAGS += -Wall -pedantic -Wshadow -Wmissing-prototypes -Wcast-align
|
|
||||||
CFLAGS += -Wcast-qual -Wchar-subscripts -Wpointer-arith
|
|
||||||
CFLAGS += -Wredundant-decls -Wstrict-prototypes
|
|
||||||
|
|
||||||
XPMLIB = -L$(PREFIX)/lib/X11 -lXpm
|
|
||||||
DEPLIBS = $(DEPXLIB)
|
|
||||||
|
|
||||||
LOCAL_LIBRARIES = $(XPMLIB) $(XLIB)
|
|
||||||
|
|
||||||
LINTLIBS = $(LINTXLIB)
|
|
||||||
|
|
||||||
SHAREDIR = $(PREFIX)/share/$(NAME)
|
|
||||||
|
|
||||||
IMAKEFILE = Imakefile
|
|
||||||
MAKEFILE = Makefile
|
|
||||||
|
|
||||||
CHANGELOG = ChangeLog
|
|
||||||
|
|
||||||
SPEC_SRC = $(NAME).spec.in
|
|
||||||
SPEC_OBJ = $(NAME).spec
|
|
||||||
SPECS = $(SPEC_SRC) $(SPEC_OBJ)
|
|
||||||
|
|
||||||
EXTRA_FILES = \@@\
|
|
||||||
$(SPECS) \@@\
|
|
||||||
$(IMAKEFILE) \@@\
|
|
||||||
$(CHANGELOG) \@@\
|
|
||||||
COPYING \@@\
|
|
||||||
INSTALL \@@\
|
|
||||||
README \@@\
|
|
||||||
configure
|
|
||||||
|
|
||||||
MANSRC = wmclock.man.in
|
|
||||||
MANOBJ = wmclock.man
|
|
||||||
|
|
||||||
SYMLINKS = month.xpm weekday.xpm
|
|
||||||
|
|
||||||
HDRS = dynlist.h
|
|
||||||
SRCS = dynlist.c wmclock.c
|
|
||||||
OBJS = dynlist.o wmclock.o
|
|
||||||
|
|
||||||
TARDIR = $(NAME)-$(VERSION)
|
|
||||||
TARBALL = $(TARDIR).tar.gz
|
|
||||||
|
|
||||||
ComplexProgramTarget($(NAME))
|
|
||||||
|
|
||||||
depend::
|
|
||||||
cat $(MANSRC) |sed \@@\
|
|
||||||
-e 's/@VERSION@/$(VERSION)/g' \@@\
|
|
||||||
-e 's/@DATE@/$(DATE)/g' \@@\
|
|
||||||
>$(MANOBJ)
|
|
||||||
|
|
||||||
.PHONY: depends tar
|
|
||||||
|
|
||||||
spec: $(SPEC_OBJ)
|
|
||||||
|
|
||||||
$(SPEC_OBJ): $(SPEC_SRC) $(IMAKEFILE)
|
|
||||||
cat $(SPEC_SRC) |sed -e 's/@VERSION@/$(VERSION)/g' >$@
|
|
||||||
|
|
||||||
install.share::
|
|
||||||
@if [ -d $(DESTDIR)$(SHAREDIR) ]; then set +x; \@@\
|
|
||||||
else (set -x; $(MKDIRHIER) $(DESTDIR)$(SHAREDIR)); fi
|
|
||||||
@set -x; \@@\
|
|
||||||
for i in lang.*; do \@@\
|
|
||||||
$(MKDIRHIER) $(DESTDIR)$(SHAREDIR)/$${i}; \@@\
|
|
||||||
$(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) ./$${i}//**/* \@@\
|
|
||||||
$(DESTDIR)$(SHAREDIR)/$${i}/; \@@\
|
|
||||||
done
|
|
||||||
|
|
||||||
tar: $(TARBALL)
|
|
||||||
|
|
||||||
$(TARBALL): $(EXTRA_FILES) $(EXTRA_DIRS) $(MANSRC) $(HDRS) $(SRCS)
|
|
||||||
$(RM) -r $(TARDIR)
|
|
||||||
$(MKDIRHIER) $(TARDIR)
|
|
||||||
$(CP) -p $(EXTRA_FILES) $(MANSRC) $(HDRS) $(SRCS) $(TARDIR)/
|
|
||||||
-for i in $(EXTRA_DIRS); do \@@\
|
|
||||||
$(MKDIRHIER) $(TARDIR)/$${i}; \@@\
|
|
||||||
$(CP) -p $${i}//**/* $(TARDIR)/$${i}/; \@@\
|
|
||||||
done >/dev/null 2>&1
|
|
||||||
chmod -Rc ug+rwX,o+rX,o-w $(TARDIR)
|
|
||||||
tar -cvf - $(TARDIR) |gzip -9 >$(TARBALL)
|
|
||||||
$(RM) -r $(TARDIR)
|
|
||||||
|
|
7
wmclock/Makefile.am
Normal file
7
wmclock/Makefile.am
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
bin_PROGRAMS = wmclock
|
||||||
|
wmclock_SOURCES = dynlist.c dynlist.h wmclock.c month.xpm weekday.xpm \
|
||||||
|
xpm/date.xpm xpm/led.xpm xpm/mask.xbm xpm/mask.xbm
|
||||||
|
AM_CFLAGS = $(x11_CFLAGS) $(xpm_CFLAGS) $(xext_CFLAGS)
|
||||||
|
LIBS += $(x11_LIBS) $(xpm_LIBS) $(xext_LIBS)
|
||||||
|
dist_man_MANS = wmclock.man
|
||||||
|
nobase_dist_pkgdata_DATA = lang.*/*.xpm
|
74
wmclock/configure
vendored
74
wmclock/configure
vendored
|
@ -1,74 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# configure: prepare wmclock to be built using imake and make
|
|
||||||
# created 1999-Mar-30 03:40 jmk
|
|
||||||
|
|
||||||
DefLanguage=english
|
|
||||||
Language=''
|
|
||||||
LangDir=''
|
|
||||||
Me=`basename $0`
|
|
||||||
|
|
||||||
GetLanguages() {
|
|
||||||
ls -1d lang.* | awk -F . '{
|
|
||||||
print " " $2
|
|
||||||
}'
|
|
||||||
}
|
|
||||||
|
|
||||||
PrintHelp() {
|
|
||||||
langlist="`GetLanguages`"
|
|
||||||
cat <<EOF
|
|
||||||
|
|
||||||
Usage: ${0} [--lang <language>]
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--lang <language>
|
|
||||||
Configure wmclock to use day and month names for the specified
|
|
||||||
language. Defaults to 'english'. Choices are:
|
|
||||||
|
|
||||||
${langlist}
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
Die() {
|
|
||||||
echo "$*"
|
|
||||||
echo "wmclock is NOT successfully configured!"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case "$1" in
|
|
||||||
--lang|--language)
|
|
||||||
shift
|
|
||||||
Language="$1"
|
|
||||||
;;
|
|
||||||
--help)
|
|
||||||
PrintHelp
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "${Language}" ]; then
|
|
||||||
Language="${DefLanguage}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LangDir="lang.${Language}"
|
|
||||||
if [ ! -d "${LangDir}" ]; then
|
|
||||||
Die "${Me}: error: cannot find language directory '${LangDir}'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Configuring for ${Language} day-of-week and month names ..."
|
|
||||||
rm -f month.xpm weekday.xpm
|
|
||||||
ln -s "./${LangDir}/month.xpm" .
|
|
||||||
ln -s "./${LangDir}/weekday.xpm" .
|
|
||||||
|
|
||||||
echo "Building Makefile from Imakefile ..."
|
|
||||||
echo "----------------------------------------------------------------"
|
|
||||||
xmkmf -a
|
|
||||||
|
|
||||||
echo "----------------------------------------------------------------"
|
|
||||||
echo "Finished configuring. To build wmclock, type 'make'."
|
|
||||||
echo
|
|
||||||
|
|
||||||
exit 0
|
|
9
wmclock/configure.ac
Normal file
9
wmclock/configure.ac
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
AC_INIT([wmclock], [1.0.14])
|
||||||
|
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||||
|
AC_CONFIG_SRCDIR([configure.ac])
|
||||||
|
AC_PROG_CC
|
||||||
|
PKG_CHECK_MODULES([x11], [x11])
|
||||||
|
PKG_CHECK_MODULES([xpm], [xpm])
|
||||||
|
PKG_CHECK_MODULES([xext], [xext])
|
||||||
|
AC_CONFIG_FILES([Makefile wmclock.man])
|
||||||
|
AC_OUTPUT
|
Loading…
Reference in a new issue