first commit
This commit is contained in:
32
source/third_party/rocketmq-client-cpp-2.2.0-source-release/rpm/build.sh
vendored
Normal file
32
source/third_party/rocketmq-client-cpp-2.2.0-source-release/rpm/build.sh
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
BASEDIR=$(dirname "$0")
|
||||
if [[ ! -d ${BASEDIR}/rocketmq_x64/CENTOS/ ]]; then
|
||||
echo "Can not find SPEC FILE"
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -d /root/rpmbuild/SOURCES/rocketmq/include ]]; then
|
||||
mkdir -p /root/rpmbuild/SOURCES/rocketmq
|
||||
mkdir -p /root/rpmbuild/SOURCES/rocketmq/include
|
||||
mkdir -p /root/rpmbuild/SOURCES/rocketmq/bin
|
||||
fi
|
||||
cp -R ${BASEDIR}/../include/* /root/rpmbuild/SOURCES/rocketmq/include
|
||||
cp ${BASEDIR}/../bin/librocketmq.so /root/rpmbuild/SOURCES/rocketmq/bin
|
||||
cp ${BASEDIR}/../bin/librocketmq.a /root/rpmbuild/SOURCES/rocketmq/bin
|
||||
cp ${BASEDIR}/rocketmq_x64/CENTOS/rocketmq-client-cpp.spec /root/rpmbuild/SPECS
|
||||
|
||||
rpmbuild -bb /root/rpmbuild/SPECS/rocketmq-client-cpp.spec
|
||||
|
||||
cp /root/rpmbuild/RPMS/x86_64/*.rpm ${BASEDIR}/rocketmq_x64
|
||||
@@ -0,0 +1,68 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
Summary: A C++ Client of Apache RocketMQ
|
||||
|
||||
Name: rocketmq-client-cpp
|
||||
Version: 2.2.0
|
||||
Release: centos
|
||||
Group: Apache
|
||||
License: APLv2
|
||||
Source: https://github.com/apache/rocketmq-client-cpp
|
||||
URL: http://rocketmq.apache.org/
|
||||
Distribution: Linux
|
||||
|
||||
%define _prefix /usr/local
|
||||
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
A C++ Client of Apache RocketMQ
|
||||
|
||||
%prep
|
||||
|
||||
pwd
|
||||
|
||||
cat /etc/redhat-release|sed -r 's/.* ([0-9]+)\..*/\1/'
|
||||
|
||||
OS_VERSION=`cat /etc/redhat-release|sed -r 's/.* ([0-9]+)\..*/\1/'`
|
||||
|
||||
echo "OS_VERSION=${OS_VERSION}"
|
||||
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
# create dirs
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
||||
|
||||
# create dirs
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/include/rocketmq
|
||||
|
||||
# copy files
|
||||
cp -f ${RPM_SOURCE_DIR}/rocketmq/bin/librocketmq.so $RPM_BUILD_ROOT%{_prefix}/lib
|
||||
cp -f ${RPM_SOURCE_DIR}/rocketmq/bin/librocketmq.a $RPM_BUILD_ROOT%{_prefix}/lib
|
||||
cp -rf ${RPM_SOURCE_DIR}/rocketmq/include/* $RPM_BUILD_ROOT%{_prefix}/include/rocketmq
|
||||
|
||||
# package information
|
||||
%files
|
||||
# set file attribute here
|
||||
%defattr(-, root, root, 0755)
|
||||
%{_prefix}/lib
|
||||
%{_prefix}/include
|
||||
|
||||
%define debug_package %{nil}
|
||||
%define __os_install_post %{nil}
|
||||
Reference in New Issue
Block a user