Merge pull request #44 from AsamK/improve_qmake
Improve qmake: "make install" support and ability to change install prefix
18
README.md
@ -41,10 +41,24 @@ Compilation on Linux
|
||||
make
|
||||
```
|
||||
|
||||
4. Install
|
||||
```bash
|
||||
sudo make install
|
||||
```
|
||||
|
||||
The executables produced will be:
|
||||
|
||||
trunk/retroshare-gui/src/RetroShare
|
||||
trunk/retroshare-nogui/src/retroshare-nogui
|
||||
/usr/bin/RetroShare06
|
||||
/usr/bin/RetroShare06-nogui
|
||||
|
||||
For packagers
|
||||
-------------
|
||||
Packagers can use PREFIX and LIB\_DIR to customize the installation paths:
|
||||
```bash
|
||||
qmake PREFIX=/usr LIB_DIR=/usr/lib64
|
||||
make
|
||||
make INSTALL_ROOT=${PKGDIR} install
|
||||
```
|
||||
|
||||
If libsqlcipher is not available as a package
|
||||
---------------------------------------------
|
||||
|
@ -11,3 +11,37 @@ SUBDIRS += \
|
||||
retroshare-gui/src/retroshare-gui.pro \
|
||||
retroshare-nogui/src/retroshare-nogui.pro \
|
||||
plugins/plugins.pro
|
||||
|
||||
unix {
|
||||
isEmpty(PREFIX) { PREFIX = /usr }
|
||||
isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare06" }
|
||||
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
|
||||
isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" }
|
||||
|
||||
icon_files.path = "$${PREFIX}/share/icons/hicolor"
|
||||
icon_files.files = data/24x24
|
||||
icon_files.files += data/48x48
|
||||
icon_files.files += data/64x64
|
||||
icon_files.files += data/128x128
|
||||
INSTALLS += icon_files
|
||||
|
||||
desktop_files.path = "$${PREFIX}/share/applications"
|
||||
desktop_files.files = data/retroshare06.desktop
|
||||
INSTALLS += desktop_files
|
||||
|
||||
pixmap_files.path = "$${PREFIX}/share/pixmaps"
|
||||
pixmap_files.files = data/retroshare06.xpm
|
||||
INSTALLS += pixmap_files
|
||||
|
||||
data_files.path = "$${DATA_DIR}"
|
||||
data_files.files = libbitdht/src/bitdht/bdboot.txt
|
||||
INSTALLS += data_files
|
||||
|
||||
webui_files.path = "$${DATA_DIR}/webui"
|
||||
webui_files.files = libresapi/src/webfiles/*
|
||||
INSTALLS += webui_files
|
||||
|
||||
webui_img_files.path = "$${DATA_DIR}/webui/img"
|
||||
webui_img_files.files = retroshare-gui/src/gui/images/logo/logo_splash.png
|
||||
INSTALLS += webui_img_files
|
||||
}
|
||||
|
@ -33,18 +33,18 @@ install: build
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
install -D -m 644 src/data/retroshare.desktop $(CURDIR)/debian/retroshare06/usr/share/applications/retroshare06.desktop
|
||||
install -D -m 644 src/data/24x24/retroshare.png $(CURDIR)/debian/retroshare06/usr/share/icons/hicolor/24x24/apps/retroshare06.png
|
||||
install -D -m 644 src/data/48x48/retroshare.png $(CURDIR)/debian/retroshare06/usr/share/icons/hicolor/48x48/apps/retroshare06.png
|
||||
install -D -m 644 src/data/64x64/retroshare.png $(CURDIR)/debian/retroshare06/usr/share/icons/hicolor/64x64/apps/retroshare06.png
|
||||
install -D -m 644 src/data/retroshare.xpm $(CURDIR)/debian/retroshare06/usr/share/pixmaps/retroshare06.xpm
|
||||
install -D -m 644 src/data/retroshare06.desktop $(CURDIR)/debian/retroshare06/usr/share/applications/retroshare06.desktop
|
||||
install -D -m 644 src/data/24x24/apps/retroshare06.png $(CURDIR)/debian/retroshare06/usr/share/icons/hicolor/24x24/apps/retroshare06.png
|
||||
install -D -m 644 src/data/48x48/apps/retroshare06.png $(CURDIR)/debian/retroshare06/usr/share/icons/hicolor/48x48/apps/retroshare06.png
|
||||
install -D -m 644 src/data/64x64/apps/retroshare06.png $(CURDIR)/debian/retroshare06/usr/share/icons/hicolor/64x64/apps/retroshare06.png
|
||||
install -D -m 644 src/data/retroshare06.xpm $(CURDIR)/debian/retroshare06/usr/share/pixmaps/retroshare06.xpm
|
||||
install -D -m 644 src/plugins/VOIP/libVOIP.so.1.0.0 $(CURDIR)/debian/retroshare06-voip-plugin/usr/lib/retroshare/extensions6/libVOIP.so
|
||||
install -D -m 644 src/plugins/FeedReader/libFeedReader.so.1.0.0 $(CURDIR)/debian/retroshare06-feedreader-plugin/usr/lib/retroshare/extensions6/libFeedReader.so
|
||||
install -D -m 644 src/libbitdht/src/bitdht/bdboot.txt $(CURDIR)/debian/retroshare06-nogui/usr/share/RetroShare06/bdboot.txt
|
||||
install -D -m 644 src/libbitdht/src/bitdht/bdboot.txt $(CURDIR)/debian/retroshare06/usr/share/RetroShare06/bdboot.txt
|
||||
install -D -m 755 src/retroshare-nogui/src/retroshare-nogui $(CURDIR)/debian/retroshare06-nogui/usr/bin/RetroShare06-nogui
|
||||
install -D -m 755 src/retroshare-nogui/src/retroshare-nogui $(CURDIR)/debian/retroshare06/usr/bin/RetroShare06-nogui
|
||||
install -D -m 755 src/retroshare-gui/src/RetroShare $(CURDIR)/debian/retroshare06/usr/bin/RetroShare06
|
||||
install -D -m 755 src/retroshare-nogui/src/RetroShare06-nogui $(CURDIR)/debian/retroshare06-nogui/usr/bin/RetroShare06-nogui
|
||||
install -D -m 755 src/retroshare-nogui/src/RetroShare06-nogui $(CURDIR)/debian/retroshare06/usr/bin/RetroShare06-nogui
|
||||
install -D -m 755 src/retroshare-gui/src/RetroShare06 $(CURDIR)/debian/retroshare06/usr/bin/RetroShare06
|
||||
install -D -m 644 src/libresapi/src/webfiles/JSXTransformer.js $(CURDIR)/debian/retroshare06/usr/share/RetroShare06/webui/JSXTransformer.js
|
||||
install -D -m 644 src/libresapi/src/webfiles/RsApi.js $(CURDIR)/debian/retroshare06/usr/share/RetroShare06/webui/RsApi.js
|
||||
install -D -m 644 src/libresapi/src/webfiles/RsXHRConnection.js $(CURDIR)/debian/retroshare06/usr/share/RetroShare06/webui/RsXHRConnection.js
|
||||
|
@ -88,7 +88,7 @@ if ! test -d ${workdir}/src/libretroshare/; then
|
||||
exit
|
||||
fi
|
||||
|
||||
cp -r data ${workdir}/src/
|
||||
#cp -r data ${workdir}/src/
|
||||
cp -r debian ${workdir}/debian
|
||||
|
||||
#svn co -r${rev} ${svnpath}/trunk/ .
|
||||
|
@ -1 +0,0 @@
|
||||
../../Debian+Ubuntu/data/24x24
|
@ -1 +0,0 @@
|
||||
../../Debian+Ubuntu/data/48x48
|
@ -1 +0,0 @@
|
||||
../../Debian+Ubuntu/data/64x64
|
@ -1 +0,0 @@
|
||||
../../Debian+Ubuntu/data/retroshare.png
|
@ -1 +0,0 @@
|
||||
../../Debian+Ubuntu/data/retroshare.xpm
|
@ -48,7 +48,7 @@ Requires: %name = %{version}
|
||||
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
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
cd lib/sqlcipher
|
||||
@ -56,33 +56,14 @@ cd lib/sqlcipher
|
||||
make
|
||||
cd -
|
||||
cd src
|
||||
qmake-qt4 CONFIG=release RetroShare.pro
|
||||
qmake-qt4 CONFIG=release PREFIX=%{_prefix} LIB_DIR=%{_libdir} 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/
|
||||
cd src
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT install
|
||||
#menu
|
||||
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/retroshare06.desktop
|
||||
|
||||
@ -106,11 +87,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files voip-plugin
|
||||
%defattr(-, root, root)
|
||||
/usr/lib/retroshare/extensions6/libVOIP.so
|
||||
%{_libdir}/retroshare/extensions6/libVOIP.so*
|
||||
|
||||
%files feedreader-plugin
|
||||
%defattr(-, root, root)
|
||||
/usr/lib/retroshare/extensions6/libFeedReader.so
|
||||
%{_libdir}/retroshare/extensions6/libFeedReader.so*
|
||||
|
||||
%changelog
|
||||
* Sat Apr 4 2015 Heini <noreply@nowhere.net> -
|
||||
|
@ -39,7 +39,7 @@
|
||||
!endif
|
||||
|
||||
# Get version from executable
|
||||
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\RetroShare.exe" VERSION_
|
||||
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\RetroShare06.exe" VERSION_
|
||||
|
||||
!define VERSION ${VERSION_1}.${VERSION_2}.${VERSION_3}${BUILDADD}
|
||||
;!define REVISION ${VERSION_4}
|
||||
@ -175,8 +175,8 @@ Section $(Section_Main) Section_Main
|
||||
|
||||
; Main binaries
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${RELEASEDIR}\retroshare-gui\src\release\RetroShare.exe"
|
||||
File "${RELEASEDIR}\retroshare-nogui\src\release\retroshare-nogui.exe"
|
||||
File /oname=RetroShare.exe "${RELEASEDIR}\retroshare-gui\src\release\RetroShare06.exe"
|
||||
File /oname=retroshare-nogui.exe "${RELEASEDIR}\retroshare-nogui\src\release\RetroShare06-nogui.exe"
|
||||
|
||||
; Qt binaries
|
||||
File "${QTDIR}\bin\QtCore4.dll"
|
||||
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
@ -119,10 +119,6 @@ HEADERS += $$PUBLIC_HEADERS
|
||||
|
||||
################################# Linux ##########################################
|
||||
linux-* {
|
||||
isEmpty(PREFIX) { PREFIX = /usr }
|
||||
isEmpty(INC_DIR) { INC_DIR = $${PREFIX}/include/retroshare/ }
|
||||
isEmpty(LIB_DIR) { LIB_DIR = $${PREFIX}/lib/ }
|
||||
|
||||
# These two lines fixe compilation on ubuntu natty. Probably a ubuntu packaging error.
|
||||
INCLUDEPATH += $$system(pkg-config --cflags glib-2.0 | sed -e "s/-I//g")
|
||||
|
||||
@ -139,10 +135,6 @@ linux-* {
|
||||
DEPENDPATH += . $${SSL_DIR} $${UPNP_DIR}
|
||||
INCLUDEPATH += . $${SSL_DIR} $${UPNP_DIR}
|
||||
|
||||
# where to put the shared library itself
|
||||
target.path = $$LIB_DIR
|
||||
INSTALLS *= target
|
||||
|
||||
SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes)
|
||||
isEmpty(SQLCIPHER_OK) {
|
||||
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
|
||||
@ -155,11 +147,6 @@ linux-* {
|
||||
}
|
||||
}
|
||||
|
||||
# where to put the librarys interface
|
||||
include_rsiface.path = $${INC_DIR}
|
||||
include_rsiface.files = $$PUBLIC_HEADERS
|
||||
INSTALLS += include_rsiface
|
||||
|
||||
#CONFIG += version_detail_bash_script
|
||||
|
||||
|
||||
@ -180,6 +167,25 @@ linux-* {
|
||||
LIBS *= -lgnome-keyring
|
||||
}
|
||||
|
||||
unix {
|
||||
isEmpty(PREFIX) { PREFIX = /usr }
|
||||
isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare06" }
|
||||
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
|
||||
isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" }
|
||||
|
||||
DEFINES *= LIB_DIR=\"\\\"$${LIB_DIR}\\\"\"
|
||||
DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\"
|
||||
|
||||
## where to put the librarys interface
|
||||
#include_rsiface.path = "$${INC_DIR}"
|
||||
#include_rsiface.files = $$PUBLIC_HEADERS
|
||||
#INSTALLS += include_rsiface
|
||||
|
||||
## where to put the shared library itself
|
||||
#target.path = "$$LIB_DIR"
|
||||
#INSTALLS *= target
|
||||
}
|
||||
|
||||
linux-g++ {
|
||||
OBJECTS_DIR = temp/linux-g++/obj
|
||||
}
|
||||
|
0
libretroshare/src/retroshare/rsexpr.h
Executable file → Normal file
@ -781,9 +781,12 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
|
||||
std::cerr << "getRetroshareDataDirectory() BSD: " << dataDirectory;
|
||||
|
||||
#else
|
||||
/* For Linux, we have a fixed standard data directory */
|
||||
dataDirectory = "/usr/share/RetroShare06";
|
||||
std::cerr << "getRetroshareDataDirectory() Linux: " << dataDirectory;
|
||||
/* For Linux, the data directory is set in libretroshare.pro */
|
||||
#ifndef DATA_DIR
|
||||
#error DATA_DIR variable not set. Cannot compile.
|
||||
#endif
|
||||
dataDirectory = DATA_DIR;
|
||||
std::cerr << "getRetroshareDataDirectory() Linux: " << dataDirectory << std::endl;
|
||||
|
||||
#endif
|
||||
#else
|
||||
|
@ -1251,7 +1251,7 @@ int RsServer::StartupRetroShare()
|
||||
std::vector<std::string> plugins_directories ;
|
||||
|
||||
#ifndef WINDOWS_SYS
|
||||
plugins_directories.push_back(std::string("/usr/lib/retroshare/extensions6/")) ;
|
||||
plugins_directories.push_back(std::string(LIB_DIR) + "/retroshare/extensions6/") ;
|
||||
#endif
|
||||
std::string extensions_dir = rsAccounts->PathBaseDirectory() + "/extensions6/" ;
|
||||
plugins_directories.push_back(extensions_dir) ;
|
||||
|
@ -3,6 +3,14 @@ TEMPLATE = lib
|
||||
DEPENDPATH += ../../libretroshare/src/ ../../retroshare-gui/src/
|
||||
INCLUDEPATH += ../../libretroshare/src/ ../../retroshare-gui/src/
|
||||
|
||||
unix {
|
||||
isEmpty(PREFIX) { PREFIX = /usr }
|
||||
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
|
||||
|
||||
target.path = "$${LIB_DIR}/retroshare/extensions6"
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
linux-g++ {
|
||||
LIBS *= -ldl
|
||||
}
|
||||
|
@ -70,11 +70,7 @@ SoundManager::SoundManager() : QObject()
|
||||
|
||||
void SoundManager::soundEvents(SoundEvents &events)
|
||||
{
|
||||
#ifdef WINDOWS_SYS
|
||||
QDir baseDir = QDir(qApp->applicationDirPath() + "/sounds");
|
||||
#else
|
||||
QDir baseDir = QDir("/usr/share/RetroShare06/sounds");
|
||||
#endif
|
||||
QDir baseDir = QDir(QString::fromUtf8(RsAccounts::DataDirectory().c_str()) + "/sounds");
|
||||
|
||||
events.mDefaultPath = baseDir.absolutePath();
|
||||
|
||||
|
@ -43,7 +43,7 @@ unfinished {
|
||||
#CONFIG += blogs
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = RetroShare
|
||||
TARGET = RetroShare06
|
||||
|
||||
DEFINES += RS_RELEASE_VERSION
|
||||
RCC_DIR = temp/qrc
|
||||
@ -109,6 +109,18 @@ linux-* {
|
||||
DEFINES *= UBUNTU
|
||||
}
|
||||
|
||||
unix {
|
||||
isEmpty(PREFIX) { PREFIX = /usr }
|
||||
isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" }
|
||||
|
||||
target.path = "$${PREFIX}/bin"
|
||||
INSTALLS += target
|
||||
|
||||
sound_files.path="$${DATA_DIR}/sounds"
|
||||
sound_files.files=sounds/*
|
||||
INSTALLS += sound_files
|
||||
}
|
||||
|
||||
linux-g++ {
|
||||
OBJECTS_DIR = temp/linux-g++/obj
|
||||
}
|
||||
@ -131,12 +143,6 @@ version_detail_bash_script {
|
||||
}
|
||||
}
|
||||
|
||||
install_rs {
|
||||
INSTALLS += binary_rs
|
||||
binary_rs.path = $$(PREFIX)/usr/bin
|
||||
binary_rs.files = ./RetroShare
|
||||
}
|
||||
|
||||
#################### Cross compilation for windows under Linux ###################
|
||||
|
||||
win32-x-g++ {
|
||||
|
@ -1,5 +1,5 @@
|
||||
TEMPLATE = app
|
||||
TARGET = retroshare-nogui
|
||||
TARGET = RetroShare06-nogui
|
||||
CONFIG += bitdht
|
||||
#CONFIG += introserver
|
||||
#CONFIG += sshserver
|
||||
@ -55,6 +55,13 @@ linux-* {
|
||||
}
|
||||
}
|
||||
|
||||
unix {
|
||||
isEmpty(PREFIX) { PREFIX = /usr }
|
||||
|
||||
target.path = "$${PREFIX}/bin"
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
linux-g++ {
|
||||
OBJECTS_DIR = temp/linux-g++/obj
|
||||
}
|
||||
|