X Tutup
Skip to content

Commit 6efeefe

Browse files
author
Sebastiano Merlino
committed
Modified rpm build in order to compile it
Lowered required version of libmicrohttpd to 0.9.7
1 parent 0f66ac2 commit 6efeefe

File tree

4 files changed

+32
-19
lines changed

4 files changed

+32
-19
lines changed

Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ AUTOMAKE_OPTIONS = foreign 1.4
2525
ACLOCAL_AMFLAGS = -I m4
2626

2727
SUBDIRS = src $(PYTHON_DIR) $(JAVA_DIR) $(PHP_DIR) $(LUA_DIR) $(PERL_DIR) $(RUBY_DIR) $(GUILE_DIR)
28-
DIST_SUBDIRS = src $(PYTHON_DIR) $(JAVA_DIR) $(PHP_DIR) $(LUA_DIR) $(PERL_DIR) $(RUBY_DIR) $(GUILE_DIR)
28+
DIST_SUBDIRS = $(SUBDIRS)
2929
EXTRA_DIST = libhttpserver.pc.in debian/changelog.in debian/control.in debian/rules.in debian/libhttpserver-dev.install.in debian/libhttpserver.install.in redhat/libhttpserver.SPEC.in $(DX_CONFIG) $(PYTHON_EXTRA) $(PHP_EXTRA) $(PERL_EXTRA)
3030

3131
MOSTLYCLEANFILES = $(DX_CLEANFILES) redhat/SOURCES/*
@@ -81,6 +81,7 @@ deb:
8181

8282
rpm: dist
8383
mkdir -p redhat/SOURCES
84+
mkdir -p redhar/BUILD
8485
cp libhttpserver-@VERSION@.tar.gz redhat/SOURCES
8586
rpmbuild -v -bb redhat/libhttpserver.SPEC
8687
rpmbuild -v -ba redhat/libhttpserver.SPEC

configure.ac

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,15 @@ AC_CHECK_HEADER([signal.h],[],[AC_MSG_ERROR("signal.h not found")])
6363
AC_CHECK_HEADER([gnutls/gnutls.h],[have_gnutls="yes"],[AC_MSG_WARN("gnutls/gnutls.h not found. TLS will be disabled"); have_gnutls="no"])
6464

6565
# Checks for libmicrohttpd
66-
PKG_CHECK_MODULES([LIBMICROHTTPD],[libmicrohttpd >= 0.9.9],[],[AC_MSG_ERROR("libmicrohttpd not present or too old - install libmicrohttpd >= 0.9.9")])
66+
PKG_CHECK_MODULES([LIBMICROHTTPD],[libmicrohttpd >= 0.9.7],[],[AC_MSG_ERROR("libmicrohttpd not present or too old - install libmicrohttpd >= 0.9.7")])
6767
#AC_CHECK_HEADER([microhttpd.h],[],[AC_MSG_ERROR("Microhttpd header files not found. Please use a version >= 0.9.9.")])
6868
#AC_CHECK_LIB([microhttpd],[MHD_start_daemon],[],[AC_MSG_ERROR("Microhttpd header files not found. Please use a version >= 0.9.9.")])
6969

70+
m4_pattern_allow([AC_TYPE_SIZE_T])
71+
m4_pattern_allow([AC_TYPE_UINT16_T])
72+
m4_pattern_allow([AC_TYPE_UINT32_T])
73+
m4_pattern_allow([AC_TYPE_UINT64_T])
74+
7075
# Checks for typedefs, structures, and compiler characteristics.
7176
AC_TYPE_SIZE_T
7277
AC_TYPE_UINT16_T
@@ -168,6 +173,7 @@ AM_CONDITIONAL([GUILE], [test x$guile = xtrue])
168173
AM_CONDITIONAL([DOC], [test x$doc = xtrue])
169174

170175
LANGUAGES="C++"
176+
OUTPUT_LANG=""
171177

172178
DX_HTML_FEATURE(ON)
173179
DX_CHM_FEATURE(OFF)
@@ -236,6 +242,7 @@ if test x$python = xtrue; then
236242
AC_SUBST_FILE([PYTHON_AUTOGENERATION])
237243
PYTHON_AUTOGENERATION=$srcdir/src/autogen_helpers/support_command
238244
LANGUAGES="$LANGUAGES Python"
245+
OUTPUT_LANG="$OUTPUT_LANG src/python/Makefile"
239246
fi
240247

241248
if test x$java = xtrue; then
@@ -266,6 +273,7 @@ if test x$java = xtrue; then
266273
AC_SUBST_FILE([JAVA_AUTOGENERATION])
267274
JAVA_AUTOGENERATION=$srcdir/src/autogen_helpers/support_command
268275
LANGUAGES="$LANGUAGES Java"
276+
OUTPUT_LANG="$OUTPUT_LANG src/java/Makefile"
269277
fi
270278

271279
if test x$php = xtrue; then
@@ -281,6 +289,7 @@ if test x$php = xtrue; then
281289
AC_SUBST_FILE([PHP_AUTOGENERATION])
282290
PHP_AUTOGENERATION=$srcdir/src/autogen_helpers/support_command
283291
LANGUAGES="$LANGUAGES PHP"
292+
OUTPUT_LANG="$OUTPUT_LANG src/php/Makefile"
284293
fi
285294

286295
if test x$lua = xtrue; then
@@ -307,6 +316,7 @@ if test x$lua = xtrue; then
307316
AC_SUBST_FILE([LUA_AUTOGENERATION])
308317
LUA_AUTOGENERATION=$srcdir/src/autogen_helpers/support_command
309318
LANGUAGES="$LANGUAGES LUA"
319+
OUTPUT_LANG="$OUTPUT_LANG src/lua/Makefile"
310320
fi
311321

312322
if test x$perl = xtrue; then
@@ -322,6 +332,7 @@ if test x$perl = xtrue; then
322332
AC_SUBST_FILE([PERL_AUTOGENERATION])
323333
PERL_AUTOGENERATION=$srcdir/src/autogen_helpers/support_command
324334
LANGUAGES="$LANGUAGES Perl"
335+
OUTPUT_LANG="$OUTPUT_LANG src/perl/Makefile"
325336
fi
326337

327338
if test x$ruby = xtrue; then
@@ -352,6 +363,7 @@ if test x$ruby = xtrue; then
352363
AC_SUBST_FILE([RUBY_AUTOGENERATION])
353364
RUBY_AUTOGENERATION=$srcdir/src/autogen_helpers/support_command
354365
LANGUAGES="$LANGUAGES Ruby"
366+
OUTPUT_LANG="$OUTPUT_LANG src/ruby/Makefile"
355367
fi
356368

357369
if test x$guile = xtrue; then
@@ -363,6 +375,7 @@ if test x$guile = xtrue; then
363375
AC_SUBST_FILE([GUILE_AUTOGENERATION])
364376
GUILE_AUTOGENERATION=$srcdir/src/autogen_helpers/support_command
365377
LANGUAGES="$LANGUAGES Guile"
378+
OUTPUT_LANG="$OUTPUT_LANG src/guile/Makefile"
366379
fi
367380

368381
AC_SUBST(LHT_LIBDEPS)
@@ -377,13 +390,7 @@ AC_OUTPUT(
377390
libhttpserver.pc
378391
Makefile
379392
src/Makefile
380-
src/python/Makefile
381-
src/java/Makefile
382-
src/php/Makefile
383-
src/lua/Makefile
384-
src/perl/Makefile
385-
src/ruby/Makefile
386-
src/guile/Makefile
393+
$OUTPUT_LANG
387394
debian/changelog
388395
debian/control
389396
debian/libhttpserver-dev.install

debian/control.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Source: libhttpserver
22
Section: libs
33
Priority: optional
44
Maintainer: Sebastiano Merlino <electrictwister2000@gmail.com>
5-
Build-Depends: libmicrohttpd10(>= 0.9.9)
5+
Build-Depends: libmicrohttpd10(>= 0.9.7)
66
Standards-Version: @VERSION@
77
Vcs-Git: git://github.com/etr/libhttpserver.git
88
Vcs-browser: https://github.com/etr/libhttpserver.git
@@ -23,7 +23,7 @@ Package: libhttpserver-dbg
2323
Section: debug
2424
Architecture: any
2525
Installed-Size:
26-
Depends: ${misc:Depends}, ${shlibs:Depends}, libmicrohttpd-dbg(>= 0.9.9)
26+
Depends: ${misc:Depends}, ${shlibs:Depends}, libmicrohttpd-dbg(>= 0.9.7)
2727
Description: libhttpserver debug
2828
library embedding RESTful HTTP server functionality (debug)
2929
libhttpserver is a small C++ library for embedding RESTful HTTP server functionality into
@@ -35,7 +35,7 @@ Package: libhttpserver-dev
3535
Section: libdevel
3636
Architecture: any
3737
Installed-Size:
38-
Depends: ${misc:Depends}, ${shlibs:Depends}, libmicrohttpd-dev(>= 0.9.9)
38+
Depends: ${misc:Depends}, ${shlibs:Depends}, libmicrohttpd-dev(>= 0.9.7)
3939
Description: libhttpserver
4040
The libhttpserver library .
4141
.

redhat/libhttpserver.SPEC.in

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ Vendor: Zencoders
1515
Prefix: /usr
1616
BuildRoot: %{buildroot}
1717
Packager: Sebastiano Merlino <merlino.sebastiano@gmail.com>
18-
BuildRequires: libmicrohttpd >= 0.9.9
19-
Requires: libmicrohttpd >= 0.9.9
18+
BuildRequires: libmicrohttpd >= 0.9.7
19+
Requires: libmicrohttpd >= 0.9.7
2020
%description
2121
libhttpserver is a small C++ library for embedding RESTful HTTP server functionality into applications.
2222

2323
%package devel
2424
Summary: Development files
25-
BuildRequires: libmicrohttpd >= 0.9.9, libmicrohttpd-devel >= 0.9.9
26-
Requires: libmicrohttpd >= 0.9.9, libmicrohttpd-devel >= 0.9.9
25+
BuildRequires: libmicrohttpd >= 0.9.7, libmicrohttpd-devel >= 0.9.7
26+
Group: Development/Libraries
27+
Requires: libmicrohttpd >= 0.9.7, libmicrohttpd-devel >= 0.9.7
2728
%description devel
2829
libhttpserver is a small C++ library for embedding RESTful HTTP server functionality into applications.
2930
This package contains development files and headers.
@@ -33,11 +34,15 @@ This package contains development files and headers.
3334
%setup
3435

3536
%build
36-
./configure
37+
mkdir build
38+
cd build
39+
../configure --prefix=$RPM_BUILD_ROOT/usr
3740
make
3841

3942
%install
40-
make install --prefix=$RPM_BUILD_ROOT/usr
43+
cd build
44+
make install
45+
rm $RPM_BUILD_ROOT/usr/lib/libhttpserver.la
4146

4247
%files
4348
%defattr(-,root,root)
@@ -47,5 +52,5 @@ make install --prefix=$RPM_BUILD_ROOT/usr
4752
%defattr(-,root,root)
4853
/usr/include
4954
/usr/lib/*.a
50-
/usr/lib/*.so.*
55+
/usr/lib/*.so
5156
/usr/lib/pkgconfig

0 commit comments

Comments
 (0)
X Tutup