Skip to content

Commit 11f3c51

Browse files
author
Sebastiano Merlino
committed
Changed in order to enhance deb packages generation
Added rpm packages generation
1 parent 0b033ed commit 11f3c51

File tree

9 files changed

+75
-8
lines changed

9 files changed

+75
-8
lines changed

AUTHORS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
Primary developer:
2-
Sebastiano Merlino <electrictwister2000@gmail.com>
2+
Sebastiano Merlino <electrictwister2000@gmail.com> (maintainer)
3+
4+
Code contributions also came from:
5+
Dario Mazza <dariomzz@gmail.com>
6+
Andrea Nicotra <nicotra.andrea@gmail.com>

Makefile.am

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ ACLOCAL_AMFLAGS = -I m4
2626

2727
SUBDIRS = src $(PYTHON_DIR) $(JAVA_DIR) $(PHP_DIR) $(LUA_DIR) $(PERL_DIR) $(RUBY_DIR) $(GUILE_DIR)
2828
DIST_SUBDIRS = src $(PYTHON_DIR) $(JAVA_DIR) $(PHP_DIR) $(LUA_DIR) $(PERL_DIR) $(RUBY_DIR) $(GUILE_DIR)
29-
EXTRA_DIST = libhttpserver.pc.in $(DX_CONFIG) $(PYTHON_EXTRA) $(PHP_EXTRA) $(PERL_EXTRA)
29+
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

31-
MOSTLYCLEANFILES = $(DX_CLEANFILES)
31+
MOSTLYCLEANFILES = $(DX_CLEANFILES) redhat/SOURCES/*
32+
DISTCLEANFILES = redhat/SOURCES/* redhat/SPEC/* redhat/* debian/* DIST_REVISION
3233

3334
pkgconfigdir = $(libdir)/pkgconfig
3435
pkgconfig_DATA = libhttpserver.pc
@@ -76,5 +77,10 @@ dist-hook:
7677
cp DIST_REVISION $(distdir)/
7778

7879
deb:
79-
cp -RLf $(top_srcdir)/debian $(builddir)
8080
debuild -i -us -uc -b
81+
82+
rpm: dist
83+
mkdir -p redhat/SOURCES
84+
cp libhttpserver-@VERSION@.tar.gz redhat/SOURCES
85+
rpmbuild -v -bb redhat/libhttpserver.SPEC
86+
rpmbuild -v -ba redhat/libhttpserver.SPEC

configure.ac

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
# Process this file with autoconf to produce a configure script.
2121

2222
AC_PREREQ(2.57)
23-
AC_INIT([libhttpserver], [0.1.2], [electrictwister2000@gmail.com])
24-
AM_INIT_AUTOMAKE([libhttpserver], [0.1.2])
23+
AC_INIT([libhttpserver], 0.1.2, [electrictwister2000@gmail.com])
24+
AM_INIT_AUTOMAKE([libhttpserver], 0.1.2)
2525
AC_CONFIG_HEADERS([config.h])
2626
AC_CONFIG_MACRO_DIR([m4])
2727

@@ -374,7 +374,7 @@ AC_SUBST(EXT_LIB_PATH)
374374
AC_SUBST(EXT_LIBS)
375375

376376
AC_OUTPUT(
377-
libhttpserver.pc
377+
libhttpserver.pc
378378
Makefile
379379
src/Makefile
380380
src/python/Makefile
@@ -384,6 +384,12 @@ AC_OUTPUT(
384384
src/perl/Makefile
385385
src/ruby/Makefile
386386
src/guile/Makefile
387+
debian/changelog
388+
debian/control
389+
debian/libhttpserver-dev.install
390+
debian/libhttpserver.install
391+
debian/rules
392+
redhat/libhttpserver.SPEC
387393
)
388394

389395
AC_MSG_NOTICE([Configuration Summary:
File renamed without changes.

debian/control renamed to debian/control.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Section: libs
33
Priority: optional
44
Maintainer: Sebastiano Merlino <electrictwister2000@gmail.com>
55
Build-Depends: libmicrohttpd10(>= 0.9.9)
6-
Standards-Version: 0.1.2
6+
Standards-Version: @VERSION@
77
Vcs-Git: git://github.com/etr/libhttpserver.git
88
Vcs-browser: https://github.com/etr/libhttpserver.git
99
Homepage: https://github.com/etr/libhttpserver
File renamed without changes.

redhat/libhttpserver.SPEC.in

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
%define _topdir @abs_builddir@
2+
%define name libhttpserver
3+
%define version @VERSION@
4+
%define buildroot %{_topdir}/%{name}-%{version}-root
5+
6+
Name: %{name}
7+
Release: 1
8+
Version: %{version}
9+
Summary: library embedding RESTful HTTP server functionality
10+
Group: Development/Libraries
11+
License: LGPL 2.1
12+
URL: https://github.com/etr/libhttpserver
13+
Source: @abs_builddir@/%{name}-%{version}.tar.gz
14+
Vendor: Zencoders
15+
Prefix: /usr
16+
BuildRoot: %{buildroot}
17+
Packager: Sebastiano Merlino <merlino.sebastiano@gmail.com>
18+
BuildRequires: libmicrohttpd >= 0.9.9
19+
Requires: libmicrohttpd >= 0.9.9
20+
%description
21+
libhttpserver is a small C++ library for embedding RESTful HTTP server functionality into applications.
22+
23+
%package devel
24+
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
27+
%description devel
28+
libhttpserver is a small C++ library for embedding RESTful HTTP server functionality into applications.
29+
This package contains development files and headers.
30+
31+
32+
%prep
33+
%setup
34+
35+
%build
36+
./configure
37+
make
38+
39+
%install
40+
make install --prefix=$RPM_BUILD_ROOT/usr
41+
42+
%files
43+
%defattr(-,root,root)
44+
/usr/lib/*.so.*
45+
46+
%files devel
47+
%defattr(-,root,root)
48+
/usr/include
49+
/usr/lib/*.a
50+
/usr/lib/*.so.*
51+
/usr/lib/pkgconfig

0 commit comments

Comments
 (0)