Skip to content

Commit db86530

Browse files
committed
XX-9201 - Completely change how rpms are built, from sipx projects to lib.
1 parent 5071476 commit db86530

File tree

176 files changed

+1251
-3479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+1251
-3479
lines changed

.gitmodules

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
[submodule "lib/openacd"]
2-
path = lib/openacd
3-
url = git@github.com:dhubler/OpenACD.git
1+
[submodule "openacd"]
2+
path = openacd
3+
url = git://github.com/dhubler/OpenACD.git
4+
[submodule "freeswitch"]
5+
path = freeswitch
6+
url = git://github.com/dhubler/freeswitch.git

Makefile.in

+6-21
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,21 @@ include $(sort $(wildcard mak/*.mk))
77
PLATFORM = $(shell cat /etc/issue | head -1 | awk '{print $$1}')
88
PLATFORM_VER = $(shell cat /etc/issue | head -1 | awk '{print $$3}')
99

10-
# camel case a lowercase project name, e.g. changes sipxportlib to sipXportLib.
11-
# NOTE: Instead of adding to this mapping, for new projects. Pick project names that conform to sipXxxx there xxx is all lowercase.
12-
ProjectDir = \
13-
$(subst sipx,sipX,\
14-
$(subst lib,Lib,\
15-
$(subst controller,Controller, \
16-
$(subst adapter,Adapter, \
17-
$(subst switch,Switch, \
18-
$(subst log,Log,$1))))))
19-
2010
LastRev = $(firstword $(shell cd $(SRC); git log -1 --format="%h %ci" -1 HEAD | sed -e 's|:|-|g'|cut -d\ -f 1) 0)
2111

12+
lowercase = $(shell echo $(1) | tr '[:upper:]' '[:lower:]')
13+
2214
# for each sipx-% target, define a variable for the corresponding project directory
23-
Project = $(firstword $(subst -, ,$(subst ., ,$1)))
15+
Project = $(firstword $(subst ., ,$1))
2416
PROJ = $(call Project, $@)
25-
PROJDIR = $(strip $(call ProjectDir, $(PROJ)))
17+
proj = $(call lowercase,$(PROJ))
18+
2619

2720
# lists all the items in the list inclusive after given item
2821
after = $(shell echo $2 | sed 's|\(.*\)\($1.*\)|\2|g')
2922

3023
# for each sipx.% target, define a variable for the last svn rev from git rebase
31-
REV = $(call LastRev, $(PROJDIR))
32-
33-
####################################################################
34-
# T A R G E T S #
35-
####################################################################
36-
37-
#
38-
# C O M M O N
39-
#
24+
REV = $(call LastRev, $(PROJ))
4025

4126
sipx.% :
4227
$(MAKE) $(foreach P,$(sipx),$(P).$*)

README

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ To install from source
44
Step 1. Build makefile.
55

66
autoreconf -if
7-
./configure --prefix=/usr/local/sipx SIPXPBXUSER=$USER
7+
./configure
88

99
Step 2. Add yum repository for dependencies
1010
There are libraries that are not available in common repositories that you'll need to to install. There's a file you can

asciidoc/.sipxecs.mk

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
asciidoc_SRPM = asciidoc-8.4.5-1.src.rpm
2+
asciidoc_SPEC = $(SRC)/$(PROJ)/asciidoc.spec
3+
asciidoc_SOURCES = asciidoc-8.4.5.tar.bz2 \
4+
$(SRC)/$(PROJ)/a2x-missing-package-msg.diff \
5+
$(SRC)/$(PROJ)/asciidoc-8.2.6-no-safe-check.diff \
6+
$(SRC)/$(PROJ)/asciidoc.changes \
7+
$(SRC)/$(PROJ)/asciidoc-ignore-deprecation.diff \
8+
$(SRC)/$(PROJ)/asciidoc-vim-fix.diff \
9+
10+
11+
# targets not defined, nothing to do
12+
asciidoc.autoreconf asciidoc.configure asciidoc.dist:;
13+
File renamed without changes.
File renamed without changes.
File renamed without changes.

boost-jam/.sipxecs.mk

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
boost-jam_SRPM = boost-jam-3.1.17-3.1.src.rpm
2+
boost-jam_SPEC = $(SRC)/$(PROJ)/boost-jam.spec
3+
boost-jam_SOURCES = $(SRC)/$(PROJ)/boost-jam-3.1.17.tgz $(SRC)/$(PROJ)/test.tgz
4+
5+
# targets not defined, nothing to do
6+
boost-jam.autoreconf boost-jam.configure boost-jam.dist:;
7+

boost-jam/boost-jam.spec

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Name: boost-jam
2+
Version: 3.1.17
3+
Release: 3.1
4+
AutoReqProv: on
5+
Summary: An Enhanced Make Replacement
6+
License: BSD
7+
Group: Development/Tools
8+
Url: http://www.boost.org/
9+
Buildroot: %{_tmppath}/%{name}-%{version}-build
10+
Source: %{name}-%{version}.tgz
11+
Source2: test.tgz
12+
13+
%description
14+
Boost Jam is a build tool based on FTJam, which in turn is based on
15+
Perforce Jam. It contains significant improvements made to facilitate
16+
its use in the Boost Build System, but should be backward compatible
17+
with Perforce Jam.
18+
19+
20+
21+
Authors:
22+
--------
23+
Perforce Jam : Cristopher Seiwald
24+
FT Jam : David Turner
25+
Boost Jam : David Abrahams
26+
27+
%prep
28+
%setup -q
29+
find . -type f|xargs chmod -R u+w
30+
chmod -x images/*.png
31+
32+
%build
33+
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing"
34+
export CFLAGS="$RPM_OPT_FLAGS"
35+
LOCATE_TARGET=bin ./build.sh gcc --symbols
36+
# Trivial test: -- Documented used of bjam -v: Print the version of jam and exit:
37+
bin/bjam -v
38+
ln -s bin bin.linux
39+
cd ..
40+
tar zxvf %{SOURCE2}
41+
ln -s %{name}-%{version} src
42+
cd test
43+
sh test.sh || if [ $? -gt 5 ]; then sh test.sh;fi
44+
45+
%install
46+
mkdir -p %{buildroot}%{_bindir}
47+
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
48+
install -m 755 bin/bjam %{buildroot}%{_bindir}/bjam-%{version}
49+
ln -sf bjam-%{version} %{buildroot}%{_bindir}/bjam
50+
ln -sf bjam-%{version} %{buildroot}%{_bindir}/jam
51+
52+
%files
53+
%defattr(-,root,root)
54+
%attr(755,root,root) %{_bindir}/*
55+
%doc *.html images
56+
57+
%clean
58+
rm -rf %{buildroot}
59+
%changelog

boost-jam/test.tgz

1.84 KB
Binary file not shown.

boost/.sipxecs.mk

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
boost_SRPM = boost-1.39.0-1.src.rpm
2+
boost_SPEC = $(SRC)/$(PROJ)/boost.spec
3+
boost_SOURCES = $(SRC)/$(PROJ)/boost_1_39_0.tar.bz2
4+
5+
# targets not defined, nothing to do
6+
boost.autoreconf boost.configure boost.dist:;
7+

boost/boost.spec

+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# This makes things much simpler
2+
%if 0%{?suse_version} && ! 0%{?sles_version}
3+
%define opensuse_version %suse_version
4+
%endif
5+
6+
7+
Name: boost
8+
Version: 1.39.0
9+
Release: 1
10+
Summary: Boost C++ Libraries
11+
License: BSD 3-Clause
12+
Group: Development/Libraries/C and C++
13+
Url: http://www.boost.org
14+
Buildroot: %{_tmppath}/%{name}-%{version}-build
15+
Source0: boost_1_39_0.tar.bz2
16+
17+
Buildrequires: boost-jam = 3.1.17
18+
19+
20+
Buildrequires: gcc-c++
21+
Buildrequires: python-devel
22+
Buildrequires: zlib-devel
23+
Buildrequires: libicu-devel
24+
25+
26+
# CENTOS
27+
%if 0%{?centos_version}
28+
Buildrequires: bzip2
29+
Buildrequires: libX11-devel
30+
%endif
31+
32+
# FEDORA
33+
%if 0%{?fedora_version}
34+
Buildrequires: bzip2-devel
35+
Buildrequires: libX11-devel
36+
%endif
37+
38+
# MANDRIVA
39+
%if 0%{?mandriva_version}
40+
Buildrequires: bzip2
41+
Buildrequires: libbzip2-devel
42+
BuildRequires: XFree86-devel
43+
%endif
44+
45+
# RHEL
46+
%if 0%{?rhel_version} == 406
47+
Buildrequires: bzip2
48+
Buildrequires: XFree86-devel
49+
%endif
50+
51+
%if 0%{?rhel_version} >= 501
52+
Buildrequires: bzip2
53+
Buildrequires: libX11-devel
54+
%endif
55+
56+
57+
%if 0%{?sles_version} == 9
58+
Buildrequires: bzip2
59+
Buildrequires: XFree86-devel
60+
%endif
61+
62+
%if 0%{?sles_version} == 10
63+
Buildrequires: bzip2
64+
%endif
65+
66+
%if 0%{?sles_version} >= 10
67+
Buildrequires: xorg-x11-devel
68+
%endif
69+
70+
%if 0%{?sles_version} >= 11
71+
Buildrequires: libbz2-devel
72+
%endif
73+
74+
# OPENSUSE
75+
%if 0%{?opensuse_version}
76+
Buildrequires: libbz2-devel
77+
Buildrequires: xorg-x11-libX11-devel
78+
%endif
79+
80+
81+
%description
82+
Boost provides free peer-reviewed portable C++ source libraries. The
83+
emphasis is on libraries that work well with the C++ Standard Library.
84+
One goal is to establish "existing practice" and provide reference
85+
implementations so that the Boost libraries are suitable for eventual
86+
standardization. Some of the libraries have already been proposed for
87+
inclusion in the C++ Standards Committee's upcoming C++ Standard
88+
Library Technical Report.
89+
90+
Although Boost was begun by members of the C++ Standards Committee
91+
Library Working Group, membership has expanded to include nearly two
92+
thousand members of the C++ community at large.
93+
94+
This package contains the dynamic libraries. For development using
95+
Boost, you also need the boost-devel package. For documentation, see
96+
the boost-doc package.
97+
98+
99+
%package devel
100+
Summary: Development package for Boost C++
101+
Group: Development/Libraries/C and C++
102+
Requires: %{name} = %{version}
103+
104+
%description devel
105+
This package contains all that is needed to develop/compile
106+
applications that use the Boost C++ libraries. For documentation see
107+
the package boost-doc.
108+
109+
110+
%prep
111+
%setup -q -n boost_1_39_0
112+
113+
114+
%build
115+
bjam --toolset=gcc stage
116+
117+
%install
118+
rm -rf $RPM_BUILD_ROOT
119+
120+
DESTDIR="%{?buildroot:%{buildroot}}"
121+
122+
mkdir -p "$DESTDIR/%{_libdir}/"
123+
124+
# libboost_regex-gcc42-mt-1_35.so.1.35.0
125+
cp -r stage/lib/libboost*.%{version} "$DESTDIR/%{_libdir}/"
126+
127+
rm -f filelist.lib filelist.devel
128+
for x in $( find "$DESTDIR/%{_libdir}/" -not -type d )
129+
do
130+
nname="$(basename "$x")" # libboost_regex-gcc42-mt-1_35.so.1.35.0
131+
sname="${nname%%.%version}" # libboost_regex-gcc42-mt-1_35.so
132+
lname="${nname%%%%-*}.so" # libboost_regex.so
133+
134+
#echo "$nname -> $sname -> $lname"
135+
136+
echo "%{_libdir}/$nname" >> filelist.lib
137+
echo "%{_libdir}/$sname" >> filelist.devel
138+
echo "%{_libdir}/$lname" >> filelist.devel
139+
140+
ln -s "$nname" "$DESTDIR/%{_libdir}/$sname"
141+
ln -s "$nname" "$DESTDIR/%{_libdir}/$lname"
142+
done
143+
144+
145+
mkdir -p "$DESTDIR/%{_includedir}"
146+
cp -r boost "$DESTDIR/%{_includedir}/"
147+
148+
mkdir -p .backup
149+
cp -r index.html .backup
150+
cp -r doc .

cppunit/.sipxecs.mk

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cppunit_SRPM = cppunit-1.12.1-2.src.rpm
2+
cppunit_SPEC = $(SRC)/$(PROJ)/cppunit.spec
3+
cppunit_SOURCES = $(SRC)/$(PROJ)/cppunit-1.12.1.tar.gz
4+
5+
# targets not defined, nothing to do
6+
cppunit.autoreconf cppunit.configure cppunit.dist:;
7+
File renamed without changes.

0 commit comments

Comments
 (0)