mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #49 from heini/redhat_build
Provide RedHat family packaging script.
This commit is contained in:
commit
fa54fcefdd
14
build_scripts/RedHat+Fedora/00Readme
Normal file
14
build_scripts/RedHat+Fedora/00Readme
Normal file
@ -0,0 +1,14 @@
|
||||
This is the build directory for RPM based Linux distributions like RedHat
|
||||
Enterprise Linux and compatible distributions (CentOS, Oracle Linux, ...) or
|
||||
Fedora.
|
||||
|
||||
To create an RPM package (as well as Source RPM) for your distribution, just
|
||||
run the makePackages.sh script found in this directory, like so:
|
||||
|
||||
./makepackages.sh
|
||||
|
||||
The script needs the rpmbuild command, which is part of the rpm-build package.
|
||||
|
||||
In case any build dependency is missing, the rpmbuild command will fail. Just
|
||||
install the missing package(s) and restart the script (Hint: all needed
|
||||
packages are listed in the provided retroshare06.spec file.)
|
1
build_scripts/RedHat+Fedora/data/24x24
Symbolic link
1
build_scripts/RedHat+Fedora/data/24x24
Symbolic link
@ -0,0 +1 @@
|
||||
../../Debian+Ubuntu/data/24x24
|
1
build_scripts/RedHat+Fedora/data/48x48
Symbolic link
1
build_scripts/RedHat+Fedora/data/48x48
Symbolic link
@ -0,0 +1 @@
|
||||
../../Debian+Ubuntu/data/48x48
|
1
build_scripts/RedHat+Fedora/data/64x64
Symbolic link
1
build_scripts/RedHat+Fedora/data/64x64
Symbolic link
@ -0,0 +1 @@
|
||||
../../Debian+Ubuntu/data/64x64
|
9
build_scripts/RedHat+Fedora/data/retroshare.desktop
Normal file
9
build_scripts/RedHat+Fedora/data/retroshare.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=RetroShare06
|
||||
Comment=Securely share files with your friends
|
||||
Exec=/usr/bin/RetroShare06
|
||||
Icon=/usr/share/pixmaps/retroshare06.xpm
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Network;P2P;
|
1
build_scripts/RedHat+Fedora/data/retroshare.png
Symbolic link
1
build_scripts/RedHat+Fedora/data/retroshare.png
Symbolic link
@ -0,0 +1 @@
|
||||
../../Debian+Ubuntu/data/retroshare.png
|
1
build_scripts/RedHat+Fedora/data/retroshare.xpm
Symbolic link
1
build_scripts/RedHat+Fedora/data/retroshare.xpm
Symbolic link
@ -0,0 +1 @@
|
||||
../../Debian+Ubuntu/data/retroshare.xpm
|
85
build_scripts/RedHat+Fedora/makePackages.sh
Executable file
85
build_scripts/RedHat+Fedora/makePackages.sh
Executable file
@ -0,0 +1,85 @@
|
||||
#!/bin/bash
|
||||
|
||||
###################### PARAMETERS ####################
|
||||
VERSION="0.6.0"
|
||||
######################################################
|
||||
dirs -c
|
||||
|
||||
echo "This script is going to build the RedHat family source package for RetroShare, from a clone of the GitHub repository."
|
||||
|
||||
# Parse options
|
||||
while [[ ${#} > 0 ]]
|
||||
do
|
||||
case ${1} in
|
||||
"-h") shift
|
||||
echo "Package building script for RedHat family distributions"
|
||||
echo "Usage:"
|
||||
echo " ${0}"
|
||||
exit 1
|
||||
;;
|
||||
"*") echo "Unknown option"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
GITROOT=$(git rev-parse --show-toplevel)
|
||||
DATE=$(git log --pretty=format:"%ai" | head -1 | cut -d\ -f1 | sed -e s/-//g)
|
||||
HASH=$(git log --pretty=format:"%H" | head -1 | cut -c1-8)
|
||||
REV=${DATE}.${HASH}
|
||||
FULL_VERSION=${VERSION}.${REV}
|
||||
|
||||
echo "Using version number: ${VERSION}"
|
||||
echo "Using revision: ${REV}"
|
||||
echo "Hit ENTER if this is correct. Otherwise hit Ctrl+C"
|
||||
read tmp
|
||||
|
||||
WORKDIR="retroshare06-${FULL_VERSION}"
|
||||
|
||||
if [[ -d ${WORKDIR} ]]
|
||||
then
|
||||
echo "Removing the directory ${WORKDIR}..."
|
||||
rm -rf ${WORKDIR}
|
||||
fi
|
||||
mkdir -p ${WORKDIR}/src
|
||||
|
||||
echo "Copying sources into workdir..."
|
||||
rsync -rc --exclude build_scripts ${GITROOT}/* ${WORKDIR}/src
|
||||
rsync -rc --copy-links data ${WORKDIR}/src
|
||||
pushd ${WORKDIR} >/dev/null
|
||||
|
||||
# Cloning sqlcipher
|
||||
echo "Cloning sqlcipher repository..."
|
||||
mkdir lib
|
||||
pushd lib >/dev/null
|
||||
git clone https://github.com/sqlcipher/sqlcipher.git
|
||||
pushd sqlcipher >/dev/null
|
||||
git checkout v3.3.1
|
||||
rm -rf .git
|
||||
popd >/dev/null
|
||||
popd >/dev/null
|
||||
|
||||
# VOIP tweak
|
||||
cp src/retroshare-gui/src/gui/chat/PopupChatDialog.ui src/plugins/VOIP/gui/PopupChatDialog.ui
|
||||
|
||||
# cleaning up protobof generated files
|
||||
rm -f src/retroshare-nogui/src/rpc/proto/gencc/*.pb.h
|
||||
rm -f src/retroshare-nogui/src/rpc/proto/gencc/*.pb.cc
|
||||
|
||||
# setup version numbers
|
||||
echo "Setting version numbers..."
|
||||
sed -e "s%RS_REVISION_NUMBER.*%RS_REVISION_NUMBER 0x${HASH}%" src/libretroshare/src/retroshare/rsversion.in >src/libretroshare/src/retroshare/rsversion.h
|
||||
popd >/dev/null
|
||||
|
||||
echo "Creating RPMs..."
|
||||
[[ -d rpm-build/rpm ]] || mkdir -p rpm-build/rpm
|
||||
pushd rpm-build/rpm >/dev/null
|
||||
for DIR in BUILD RPMS SOURCES SPECS SRPMS
|
||||
do
|
||||
[[ -d ${DIR} ]] || mkdir ${DIR}
|
||||
done
|
||||
popd >/dev/null
|
||||
tar -zcf rpm-build/rpm/SOURCES/${WORKDIR}.tar.gz ${WORKDIR}
|
||||
rpmbuild --define="%rev ${REV}" --define="%_usrsrc $PWD/rpm-build" --define="%_topdir %{_usrsrc}/rpm" -ba retroshare06.spec
|
||||
rm -rf ${WORKDIR}
|
||||
exit 0
|
118
build_scripts/RedHat+Fedora/retroshare06.spec
Normal file
118
build_scripts/RedHat+Fedora/retroshare06.spec
Normal file
@ -0,0 +1,118 @@
|
||||
Summary: Secure communication with friends
|
||||
Name: retroshare06
|
||||
Version: 0.6.0.%{rev}
|
||||
Release: 1%{?dist}
|
||||
License: GPLv3
|
||||
Group: Productivity/Networking/Other
|
||||
URL: http://retroshare.sourceforge.net/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
Requires: qt-x11
|
||||
BuildRequires: gcc-c++ qt-devel desktop-file-utils libgnome-keyring-devel glib2-devel libssh-devel protobuf-devel libcurl-devel libxml2-devel libxslt-devel openssl-devel libXScrnSaver-devel libupnp-devel bzip2-devel libmicrohttpd-devel
|
||||
# This is because of sqlcipher:
|
||||
BuildRequires: tcl
|
||||
|
||||
%description
|
||||
RetroShare is a decentralized, private and secure commmunication and sharing platform. RetroShare provides filesharing, chat, messages, forums and channels.
|
||||
|
||||
Authors:
|
||||
see http://retroshare.sourceforge.net/team.html
|
||||
|
||||
%package nogui
|
||||
Summary: RetroShare cli client
|
||||
Group: Productivity/Network/Other
|
||||
Requires: openssl
|
||||
Conflicts: %name = %{version}
|
||||
|
||||
%description nogui
|
||||
This is the command-line client for RetroShare network. This client can be contacted and talked-to using SSL. Clients exist for portable devices running e.g. Android.
|
||||
|
||||
%package voip-plugin
|
||||
Summary: RetroShare VOIP plugin
|
||||
Group: Productivity/Networking/Other
|
||||
Requires: %name = %{version}
|
||||
BuildRequires: opencv-devel speex-devel
|
||||
%if 0%{?fedora} >= 22
|
||||
BuildRequires: speexdsp-devel
|
||||
%endif
|
||||
|
||||
%description voip-plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication platform. The plugin adds voice-over-IP functionality to the private chat window. Both friends chatting together need the plugin installed to be able to talk together.
|
||||
|
||||
%package feedreader-plugin
|
||||
Summary: RetroShare FeedReader plugin
|
||||
Group: Productivity/Networking/Other
|
||||
Requires: %name = %{version}
|
||||
|
||||
%description feedreader-plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication platform. The plugin adds a RSS feed reader tab to retroshare.
|
||||
|
||||
%prep
|
||||
%setup -q -a 0
|
||||
|
||||
%build
|
||||
cd lib/sqlcipher
|
||||
./configure --disable-shared --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
|
||||
make
|
||||
cd -
|
||||
cd src
|
||||
qmake-qt4 CONFIG=release RetroShare.pro
|
||||
make
|
||||
cd -
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/RetroShare06
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/retroshare/extensions6
|
||||
#bin
|
||||
install -m 755 src/retroshare-gui/src/RetroShare $RPM_BUILD_ROOT%{_bindir}/RetroShare06
|
||||
install -m 755 src/retroshare-nogui/src/retroshare-nogui $RPM_BUILD_ROOT%{_bindir}/RetroShare06-nogui
|
||||
#icons
|
||||
install -m 644 src/data/retroshare.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps/retroshare06.xpm
|
||||
install -m 644 src/data/24x24/retroshare.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/24x24/apps/retroshare06.png
|
||||
install -m 644 src/data/48x48/retroshare.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/retroshare06.png
|
||||
install -m 644 src/data/64x64/retroshare.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/retroshare06.png
|
||||
install -m 644 src/data/retroshare.desktop $RPM_BUILD_ROOT%{_datadir}/applications/retroshare06.desktop
|
||||
install -m 644 src/libbitdht/src/bitdht/bdboot.txt $RPM_BUILD_ROOT%{_datadir}/RetroShare06/
|
||||
#plugins
|
||||
install -m 755 src/plugins/VOIP/libVOIP.so $RPM_BUILD_ROOT/usr/lib/retroshare/extensions6/
|
||||
install -m 755 src/plugins/FeedReader/libFeedReader.so $RPM_BUILD_ROOT/usr/lib/retroshare/extensions6/
|
||||
#menu
|
||||
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/retroshare06.desktop
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/RetroShare06
|
||||
%defattr(644, root, root)
|
||||
%{_datadir}/pixmaps/%{name}.xpm
|
||||
%{_datadir}/icons/hicolor
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/RetroShare06
|
||||
|
||||
%files nogui
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/RetroShare06-nogui
|
||||
%defattr(644, root, root)
|
||||
%{_datadir}/RetroShare06
|
||||
|
||||
%files voip-plugin
|
||||
%defattr(-, root, root)
|
||||
/usr/lib/retroshare/extensions6/libVOIP.so
|
||||
|
||||
%files feedreader-plugin
|
||||
%defattr(-, root, root)
|
||||
/usr/lib/retroshare/extensions6/libFeedReader.so
|
||||
|
||||
%changelog
|
||||
* Sat Apr 4 2015 Heini <noreply@nowhere.net> -
|
||||
- Initial build.
|
||||
|
Loading…
Reference in New Issue
Block a user