Browse Source

some minor fixes with respect to RPM package building

master
cbauer 24 years ago
parent
commit
bea22589e5
  1. 21
      Makefile.in
  2. 70
      cln.m4
  3. 7
      cln.spec.in
  4. 21
      doc/Makefile.in
  5. 39
      src/Makefile.in

21
Makefile.in

@ -11,6 +11,7 @@ datadir = @datadir@
libdir = @libdir@ libdir = @libdir@
includedir = @includedir@ includedir = @includedir@
mandir = @mandir@ mandir = @mandir@
DESTDIR =
# Programs used by "make": # Programs used by "make":
CC = @CC@ CC = @CC@
@ -31,22 +32,22 @@ all : force
install : installdirs force install : installdirs force
cd @subdir@; $(MAKE) install cd @subdir@; $(MAKE) install
$(INSTALL_PROGRAM) cln-config $(bindir)/cln-config
$(INSTALL_DATA) cln-config.1 $(mandir)/man1/cln-config.1
$(INSTALL_DATA) cln.m4 $(datadir)/aclocal/cln.m4
$(INSTALL_PROGRAM) cln-config $(DESTDIR)$(bindir)/cln-config
$(INSTALL_DATA) cln-config.1 $(DESTDIR)$(mandir)/man1/cln-config.1
$(INSTALL_DATA) cln.m4 $(DESTDIR)$(datadir)/aclocal/cln.m4
installdirs : force installdirs : force
cd @subdir@; $(MAKE) installdirs cd @subdir@; $(MAKE) installdirs
if [ ! -d $(mandir) ] ; then mkdir $(mandir) ; fi
if [ ! -d $(mandir)/man1 ] ; then mkdir $(mandir)/man1 ; fi
if [ ! -d $(datadir)/aclocal ] ; then mkdir $(datadir)/aclocal ; fi
if [ ! -d $(bindir) ] ; then mkdir $(bindir) ; fi
if [ ! -d $(DESTDIR)$(mandir) ] ; then mkdir $(DESTDIR)$(mandir) ; fi
if [ ! -d $(DESTDIR)$(mandir)/man1 ] ; then mkdir $(DESTDIR)$(mandir)/man1 ; fi
if [ ! -d $(DESTDIR)$(datadir)/aclocal ] ; then mkdir $(DESTDIR)$(datadir)/aclocal ; fi
if [ ! -d $(DESTDIR)$(bindir) ] ; then mkdir $(DESTDIR)$(bindir) ; fi
uninstall : force uninstall : force
cd @subdir@; $(MAKE) uninstall cd @subdir@; $(MAKE) uninstall
$(RM) $(bindir)/cln-config
$(RM) $(mandir)/man1/cln-config.1
$(RM) $(datadir)/aclocal/cln.m4
$(RM) $(DESTDIR)$(bindir)/cln-config
$(RM) $(DESTDIR)$(mandir)/man1/cln-config.1
$(RM) $(DESTDIR)$(datadir)/aclocal/cln.m4
check : force check : force
cd @subdir@; $(MAKE) check cd @subdir@; $(MAKE) check

70
cln.m4

@ -15,22 +15,22 @@ AC_DEFUN(AC_PATH_LIBCLN,
dnl Get the cppflags and libraries from the cln-config script dnl Get the cppflags and libraries from the cln-config script
dnl dnl
AC_ARG_WITH(cln-prefix,[ --with-cln-prefix=PFX Prefix where CLN is installed (optional)], AC_ARG_WITH(cln-prefix,[ --with-cln-prefix=PFX Prefix where CLN is installed (optional)],
cln_prefix="$withval", cln_prefix="")
cln_config_prefix="$withval", cln_config_prefix="")
AC_ARG_WITH(cln-exec-prefix,[ --with-cln-exec-prefix=PFX Exec prefix where CLN is installed (optional)], AC_ARG_WITH(cln-exec-prefix,[ --with-cln-exec-prefix=PFX Exec prefix where CLN is installed (optional)],
cln_exec_prefix="$withval", cln_exec_prefix="")
cln_config_exec_prefix="$withval", cln_config_exec_prefix="")
AC_ARG_ENABLE(clntest, [ --disable-clntest Do not try to compile and run a test CLN program], AC_ARG_ENABLE(clntest, [ --disable-clntest Do not try to compile and run a test CLN program],
, enable_clntest=yes) , enable_clntest=yes)
if test x$cln_exec_prefix != x ; then
cln_args="$cln_args --exec-prefix=$cln_exec_prefix"
if test x$cln_config_exec_prefix != x ; then
cln_config_args="$cln_config_args --exec-prefix=$cln_config_exec_prefix"
if test x${CLN_CONFIG+set} != xset ; then if test x${CLN_CONFIG+set} != xset ; then
CLN_CONFIG=$cln_exec_prefix/bin/cln-config
CLN_CONFIG=$cln_config_exec_prefix/bin/cln-config
fi fi
fi fi
if test x$cln_prefix != x ; then
cln_args="$cln_args --prefix=$cln_prefix"
if test x$cln_config_prefix != x ; then
cln_config_args="$cln_config_args --prefix=$cln_config_prefix"
if test x${CLN_CONFIG+set} != xset ; then if test x${CLN_CONFIG+set} != xset ; then
CLN_CONFIG=$cln_prefix/bin/cln-config
CLN_CONFIG=$cln_config_prefix/bin/cln-config
fi fi
fi fi
@ -41,14 +41,13 @@ AC_ARG_ENABLE(clntest, [ --disable-clntest Do not try to compile and run
if test "$CLN_CONFIG" = "no" ; then if test "$CLN_CONFIG" = "no" ; then
no_cln=yes no_cln=yes
else else
LIBCLN_CPPFLAGS=`$CLN_CONFIG $clnconf_args --cppflags`
LIBCLN_LIBS=`$CLN_CONFIG $clnconf_args --libs`
cln_major_version=`$CLN_CONFIG $cln_args --version | \
LIBCLN_CPPFLAGS=`$CLN_CONFIG $cln_config_args --cppflags`
LIBCLN_LIBS=`$CLN_CONFIG $cln_config_args --libs`
cln_config_major_version=`$CLN_CONFIG $cln_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
cln_minor_version=`$CLN_CONFIG $cln_args --version | \
cln_config_minor_version=`$CLN_CONFIG $cln_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
cln_micro_version=`$CLN_CONFIG $cln_config_args --version | \
cln_config_micro_version=`$CLN_CONFIG $cln_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_clntest" = "xyes" ; then if test "x$enable_clntest" = "xyes" ; then
ac_save_CPPFLAGS="$CPPFLAGS" ac_save_CPPFLAGS="$CPPFLAGS"
@ -62,38 +61,55 @@ dnl
rm -f conf.clntest rm -f conf.clntest
AC_TRY_RUN([ AC_TRY_RUN([
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <cln/config.h> #include <cln/config.h>
int main ()
/* we do not #include <stdlib.h> because autoconf in C++ mode inserts a
prototype for exit() that conflicts with the one in stdlib.h */
extern "C" int system(const char *);
char* my_strdup (char *str)
{
char *new_str;
if (str) {
new_str = new char[(strlen (str) + 1) * sizeof(char)];
strcpy (new_str, str);
} else
new_str = NULL;
return new_str;
}
int main()
{ {
int major, minor, micro; int major, minor, micro;
char *tmp_version; char *tmp_version;
system("touch conf.clntest"); system("touch conf.clntest");
tmp_version = strdup("$min_cln_version");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_cln_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) { if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_cln_version"); printf("%s, bad version string\n", "$min_cln_version");
exit(1);
return 1;
} }
if (($cln_major_version > major) ||
(($cln_major_version == major) && ($cln_minor_version > minor)) ||
(($cln_major_version == major) && ($cln_minor_version == minor) && ($cln_micro_version >= micro))) {
if ((CL_VERSION_MAJOR == $cln_major_version) &&
(CL_VERSION_MINOR == $cln_minor_version) &&
(CL_VERSION_PATCHLEVEL == $cln_micro_version)) {
if (($cln_config_major_version > major) ||
(($cln_config_major_version == major) && ($cln_config_minor_version > minor)) ||
(($cln_config_major_version == major) && ($cln_config_minor_version == minor) && ($cln_config_micro_version >= micro))) {
if ((CL_VERSION_MAJOR == $cln_config_major_version) &&
(CL_VERSION_MINOR == $cln_config_minor_version) &&
(CL_VERSION_PATCHLEVEL == $cln_config_micro_version)) {
return 0; return 0;
} else { } else {
printf("\n*** 'cln-config --version' returned %d.%d.%d, but the header file I found\n", $cln_major_version, $cln_minor_version, $cln_micro_version);
printf("\n*** 'cln-config --version' returned %d.%d.%d, but the header file I found\n", $cln_config_major_version, $cln_config_minor_version, $cln_config_micro_version);
printf("*** corresponds to %d.%d.%d. This mismatch suggests your installation of CLN\n", CL_VERSION_MAJOR, CL_VERSION_MINOR, CL_VERSION_PATCHLEVEL); printf("*** corresponds to %d.%d.%d. This mismatch suggests your installation of CLN\n", CL_VERSION_MAJOR, CL_VERSION_MINOR, CL_VERSION_PATCHLEVEL);
printf("*** is corrupted. Please inquire and consider reinstalling CLN.\n"); printf("*** is corrupted. Please inquire and consider reinstalling CLN.\n");
return 1; return 1;
} }
} else { } else {
printf("\n*** 'cln-config --version' returned %d.%d.%d, but the minimum version\n", $cln_major_version, $cln_minor_version, $cln_micro_version);
printf("\n*** 'cln-config --version' returned %d.%d.%d, but the minimum version\n", $cln_config_major_version, $cln_config_minor_version, $cln_config_micro_version);
printf("*** of CLN required is %d.%d.%d. If cln-config is correct, then it is\n", major, minor, micro); printf("*** of CLN required is %d.%d.%d. If cln-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n"); printf("*** best to upgrade to the required version.\n");
printf("*** If cln-config was wrong, set the environment variable CLN_CONFIG\n"); printf("*** If cln-config was wrong, set the environment variable CLN_CONFIG\n");
@ -108,7 +124,7 @@ int main ()
fi fi
fi fi
if test "x$no_cln" = x ; then if test "x$no_cln" = x ; then
AC_MSG_RESULT(yes)
AC_MSG_RESULT([yes, `$CLN_CONFIG --version`])
ifelse([$2], , :, [$2]) ifelse([$2], , :, [$2])
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)

7
cln.spec.in

@ -37,6 +37,7 @@ make
%install %install
rm -rf ${RPM_BUILD_ROOT} rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}/usr
make prefix=%{_prefix} DESTDIR=${RPM_BUILD_ROOT} install make prefix=%{_prefix} DESTDIR=${RPM_BUILD_ROOT} install
gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/cln.info* gzip -9nf ${RPM_BUILD_ROOT}%{_infodir}/cln.info*
@ -64,12 +65,14 @@ fi
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc examples
%doc examples/*.cc
%{_libdir}/*.a %{_libdir}/*.a
%{_libdir}/*.la %{_libdir}/*.la
%{_libdir}/*.so %{_libdir}/*.so
%{_includedir}/*.h
%{_includedir}/cln/*.h
%{_infodir}/*.info* %{_infodir}/*.info*
%{_mandir}/man1/cln-config.1
%{_bindir}/cln-config %{_bindir}/cln-config
%{_datadir}/aclocal/*
%changelog %changelog

21
doc/Makefile.in

@ -14,6 +14,7 @@ infodir = @infodir@
mandir = @mandir@ mandir = @mandir@
htmldir = $(datadir)/html htmldir = $(datadir)/html
dvidir = $(datadir)/dvi dvidir = $(datadir)/dvi
DESTDIR =
# Programs used by "make": # Programs used by "make":
RM = rm -f RM = rm -f
@ -78,20 +79,20 @@ $(PACKAGE)_toc.html : $(srcdir)/$(PACKAGE).texi
install : all installdirs force install : all installdirs force
$(INSTALL_DATA) $(srcdir)/$(PACKAGE).info $(infodir)/$(PACKAGE).info
$(INSTALL_DATA) $(srcdir)/$(PACKAGE)_*.html $(htmldir)
$(INSTALL_DATA) $(srcdir)/$(PACKAGE).dvi $(dvidir)/$(PACKAGE).dvi
$(INSTALL_DATA) $(srcdir)/$(PACKAGE).info $(DESTDIR)$(infodir)/$(PACKAGE).info
$(INSTALL_DATA) $(srcdir)/$(PACKAGE)_*.html $(DESTDIR)$(htmldir)
$(INSTALL_DATA) $(srcdir)/$(PACKAGE).dvi $(DESTDIR)$(dvidir)/$(PACKAGE).dvi
installdirs : force installdirs : force
if [ ! -d $(datadir) ] ; then mkdir $(datadir) ; fi
if [ ! -d $(infodir) ] ; then mkdir $(infodir) ; fi
if [ ! -d $(htmldir) ] ; then mkdir $(htmldir) ; fi
if [ ! -d $(dvidir) ] ; then mkdir $(dvidir) ; fi
if [ ! -d $(DESTDIR)$(datadir) ] ; then mkdir $(DESTDIR)$(datadir) ; fi
if [ ! -d $(DESTDIR)$(infodir) ] ; then mkdir $(DESTDIR)$(infodir) ; fi
if [ ! -d $(DESTDIR)$(htmldir) ] ; then mkdir $(DESTDIR)$(htmldir) ; fi
if [ ! -d $(DESTDIR)$(dvidir) ] ; then mkdir $(DESTDIR)$(dvidir) ; fi
uninstall : force uninstall : force
$(RM) $(infodir)/$(PACKAGE).info
$(RM) $(htmldir)/$(PACKAGE)_*.html
$(RM) $(dvidir)/$(PACKAGE).dvi
$(RM) $(DESTDIR)$(infodir)/$(PACKAGE).info
$(RM) $(DESTDIR)$(htmldir)/$(PACKAGE)_*.html
$(RM) $(DESTDIR)$(dvidir)/$(PACKAGE).dvi
check : all check : all

39
src/Makefile.in

@ -14,6 +14,7 @@ datadir = @datadir@
libdir = @libdir@ libdir = @libdir@
includedir = @includedir@ includedir = @includedir@
mandir = @mandir@ mandir = @mandir@
DESTDIR =
# Programs used by "make": # Programs used by "make":
# C compiler # C compiler
@ -199,29 +200,29 @@ libcln.la : $(LIBTOOL) $(ALLOBJECTS_LO)
$(LIBTOOL_LINK) $(CC) -o libcln.la -rpath $(libdir) -version-info $(CL_CURRENT):$(CL_REVISION):$(CL_AGE) $(LDFLAGS) $(LIBS) $(ALLOBJECTS_LO) $(LIBTOOL_LINK) $(CC) -o libcln.la -rpath $(libdir) -version-info $(CL_CURRENT):$(CL_REVISION):$(CL_AGE) $(LDFLAGS) $(LIBS) $(ALLOBJECTS_LO)
install : all force install : all force
if [ ! -d $(libdir) ] ; then mkdir $(libdir) ; fi
$(LIBTOOL_INSTALL) $(INSTALL_DATA) libcln.la $(libdir)/libcln.la
if [ ! -d $(includedir) ] ; then mkdir $(includedir) ; fi
if [ ! -d $(includedir)/cln ] ; then mkdir $(includedir)/cln ; fi
$(INSTALL_DATA) $(top_srcdir)/include/cln/*.h $(includedir)/cln
$(INSTALL_DATA) ../include/cln/*.h $(includedir)/cln
# if [ ! -d $(mandir) ] ; then mkdir $(mandir) ; fi
# if [ ! -d $(mandir)/man3 ] ; then mkdir $(mandir)/man3 ; fi
# if [ ! -d $(datadir) ] ; then mkdir $(datadir) ; fi
# if [ ! -d $(datadir)/html ] ; then mkdir $(datadir)/html ; fi
if [ ! -d $(DESTDIR)$(libdir) ] ; then mkdir $(DESTDIR)$(libdir) ; fi
$(LIBTOOL_INSTALL) $(INSTALL_DATA) libcln.la $(DESTDIR)$(libdir)/libcln.la
if [ ! -d $(DESTDIR)$(includedir) ] ; then mkdir $(DESTDIR)$(includedir) ; fi
if [ ! -d $(DESTDIR)$(includedir)/cln ] ; then mkdir $(DESTDIR)$(includedir)/cln ; fi
$(INSTALL_DATA) $(top_srcdir)/include/cln/*.h $(DESTDIR)$(includedir)/cln
$(INSTALL_DATA) ../include/cln/*.h $(DESTDIR)$(includedir)/cln
# if [ ! -d $(DESTDIR)$(mandir) ] ; then mkdir $(DESTDIR)$(mandir) ; fi
# if [ ! -d $(DESTDIR)$(mandir)/man3 ] ; then mkdir $(DESTDIR)$(mandir)/man3 ; fi
# if [ ! -d $(DESTDIR)$(datadir) ] ; then mkdir $(DESTDIR)$(datadir) ; fi
# if [ ! -d $(DESTDIR)$(datadir)/html ] ; then mkdir $(DESTDIR)$(datadir)/html ; fi
installdirs : force installdirs : force
if [ ! -d $(libdir) ] ; then mkdir $(libdir) ; fi
if [ ! -d $(includedir) ] ; then mkdir $(includedir) ; fi
if [ ! -d $(includedir)/cln ] ; then mkdir $(includedir)/cln ; fi
# if [ ! -d $(mandir) ] ; then mkdir $(mandir) ; fi
# if [ ! -d $(mandir)/man3 ] ; then mkdir $(mandir)/man3 ; fi
# if [ ! -d $(datadir) ] ; then mkdir $(datadir) ; fi
# if [ ! -d $(datadir)/html ] ; then mkdir $(datadir)/html ; fi
if [ ! -d $(DESTDIR)$(libdir) ] ; then mkdir $(DESTDIR)$(libdir) ; fi
if [ ! -d $(DESTDIR)$(includedir) ] ; then mkdir $(DESTDIR)$(includedir) ; fi
if [ ! -d $(DESTDIR)$(includedir)/cln ] ; then mkdir $(DESTDIR)$(includedir)/cln ; fi
# if [ ! -d $(DESTDIR)$(mandir) ] ; then mkdir $(DESTDIR)$(mandir) ; fi
# if [ ! -d $(DESTDIR)$(mandir)/man3 ] ; then mkdir $(DESTDIR)$(mandir)/man3 ; fi
# if [ ! -d $(DESTDIR)$(datadir) ] ; then mkdir $(DESTDIR)$(datadir) ; fi
# if [ ! -d $(DESTDIR)$(datadir)/html ] ; then mkdir $(DESTDIR)$(datadir)/html ; fi
uninstall : force uninstall : force
$(LIBTOOL_UNINSTALL) $(RM) $(libdir)/libcln.la
$(RM) -r $(includedir)/cln
$(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libcln.la
$(RM) -r $(DESTDIR)$(includedir)/cln
check : all check : all

Loading…
Cancel
Save