From 5aaf3e66f7c5aaff030bc39b68be209ae814f284 Mon Sep 17 00:00:00 2001 From: AsamK Date: Tue, 25 Aug 2015 00:56:50 +0200 Subject: [PATCH] Move data dir from build_scripts/ to root and adapt RedHat build files The icons and desktop file in the data directory are shared between linux distributions so they shouldn't be in the build_scripts directory. The redhat build now makes use of "make install" and relocatable plugins dir. --- RetroShare.pro | 12 +++---- .../Debian+Ubuntu/makeSourcePackage.sh | 2 +- build_scripts/RedHat+Fedora/data/24x24 | 1 - build_scripts/RedHat+Fedora/data/48x48 | 1 - build_scripts/RedHat+Fedora/data/64x64 | 1 - .../RedHat+Fedora/data/retroshare.png | 1 - .../RedHat+Fedora/data/retroshare.xpm | 1 - build_scripts/RedHat+Fedora/retroshare06.spec | 31 ++++-------------- .../128x128/apps/retroshare06.png | Bin .../data => data}/24x24/apps/retroshare06.png | Bin .../data => data}/48x48/apps/retroshare06.png | Bin .../data => data}/64x64/apps/retroshare06.png | Bin .../data => data}/retroshare06.desktop | 0 .../data => data}/retroshare06.xpm | 0 14 files changed, 13 insertions(+), 37 deletions(-) delete mode 120000 build_scripts/RedHat+Fedora/data/24x24 delete mode 120000 build_scripts/RedHat+Fedora/data/48x48 delete mode 120000 build_scripts/RedHat+Fedora/data/64x64 delete mode 120000 build_scripts/RedHat+Fedora/data/retroshare.png delete mode 120000 build_scripts/RedHat+Fedora/data/retroshare.xpm rename {build_scripts/Debian+Ubuntu/data => data}/128x128/apps/retroshare06.png (100%) rename {build_scripts/Debian+Ubuntu/data => data}/24x24/apps/retroshare06.png (100%) rename {build_scripts/Debian+Ubuntu/data => data}/48x48/apps/retroshare06.png (100%) rename {build_scripts/Debian+Ubuntu/data => data}/64x64/apps/retroshare06.png (100%) rename {build_scripts/Debian+Ubuntu/data => data}/retroshare06.desktop (100%) rename {build_scripts/Debian+Ubuntu/data => data}/retroshare06.xpm (100%) diff --git a/RetroShare.pro b/RetroShare.pro index 85834dfd7..9ec3de6fc 100644 --- a/RetroShare.pro +++ b/RetroShare.pro @@ -19,18 +19,18 @@ unix { isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" } icon_files.path = "$${PREFIX}/share/icons/hicolor" - icon_files.files = build_scripts/Debian+Ubuntu/data/24x24 - icon_files.files += build_scripts/Debian+Ubuntu/data/48x48 - icon_files.files += build_scripts/Debian+Ubuntu/data/64x64 - icon_files.files += build_scripts/Debian+Ubuntu/data/128x128 + 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 = build_scripts/Debian+Ubuntu/retroshare06.desktop + desktop_files.files = data/retroshare06.desktop INSTALLS += desktop_files pixmap_files.path = "$${PREFIX}/share/pixmaps" - pixmap_files.files = build_scripts/Debian+Ubuntu/retroshare06.xpm + pixmap_files.files = data/retroshare06.xpm INSTALLS += pixmap_files data_files.path = "$${DATA_DIR}" diff --git a/build_scripts/Debian+Ubuntu/makeSourcePackage.sh b/build_scripts/Debian+Ubuntu/makeSourcePackage.sh index 42f1145bf..78efdf17e 100755 --- a/build_scripts/Debian+Ubuntu/makeSourcePackage.sh +++ b/build_scripts/Debian+Ubuntu/makeSourcePackage.sh @@ -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/ . diff --git a/build_scripts/RedHat+Fedora/data/24x24 b/build_scripts/RedHat+Fedora/data/24x24 deleted file mode 120000 index 77a1374cb..000000000 --- a/build_scripts/RedHat+Fedora/data/24x24 +++ /dev/null @@ -1 +0,0 @@ -../../Debian+Ubuntu/data/24x24 \ No newline at end of file diff --git a/build_scripts/RedHat+Fedora/data/48x48 b/build_scripts/RedHat+Fedora/data/48x48 deleted file mode 120000 index 4780cf1bb..000000000 --- a/build_scripts/RedHat+Fedora/data/48x48 +++ /dev/null @@ -1 +0,0 @@ -../../Debian+Ubuntu/data/48x48 \ No newline at end of file diff --git a/build_scripts/RedHat+Fedora/data/64x64 b/build_scripts/RedHat+Fedora/data/64x64 deleted file mode 120000 index ab693380a..000000000 --- a/build_scripts/RedHat+Fedora/data/64x64 +++ /dev/null @@ -1 +0,0 @@ -../../Debian+Ubuntu/data/64x64 \ No newline at end of file diff --git a/build_scripts/RedHat+Fedora/data/retroshare.png b/build_scripts/RedHat+Fedora/data/retroshare.png deleted file mode 120000 index ec895c801..000000000 --- a/build_scripts/RedHat+Fedora/data/retroshare.png +++ /dev/null @@ -1 +0,0 @@ -../../Debian+Ubuntu/data/retroshare.png \ No newline at end of file diff --git a/build_scripts/RedHat+Fedora/data/retroshare.xpm b/build_scripts/RedHat+Fedora/data/retroshare.xpm deleted file mode 120000 index 1d158a657..000000000 --- a/build_scripts/RedHat+Fedora/data/retroshare.xpm +++ /dev/null @@ -1 +0,0 @@ -../../Debian+Ubuntu/data/retroshare.xpm \ No newline at end of file diff --git a/build_scripts/RedHat+Fedora/retroshare06.spec b/build_scripts/RedHat+Fedora/retroshare06.spec index 3004e2fc4..bb8339330 100644 --- a/build_scripts/RedHat+Fedora/retroshare06.spec +++ b/build_scripts/RedHat+Fedora/retroshare06.spec @@ -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 - diff --git a/build_scripts/Debian+Ubuntu/data/128x128/apps/retroshare06.png b/data/128x128/apps/retroshare06.png similarity index 100% rename from build_scripts/Debian+Ubuntu/data/128x128/apps/retroshare06.png rename to data/128x128/apps/retroshare06.png diff --git a/build_scripts/Debian+Ubuntu/data/24x24/apps/retroshare06.png b/data/24x24/apps/retroshare06.png similarity index 100% rename from build_scripts/Debian+Ubuntu/data/24x24/apps/retroshare06.png rename to data/24x24/apps/retroshare06.png diff --git a/build_scripts/Debian+Ubuntu/data/48x48/apps/retroshare06.png b/data/48x48/apps/retroshare06.png similarity index 100% rename from build_scripts/Debian+Ubuntu/data/48x48/apps/retroshare06.png rename to data/48x48/apps/retroshare06.png diff --git a/build_scripts/Debian+Ubuntu/data/64x64/apps/retroshare06.png b/data/64x64/apps/retroshare06.png similarity index 100% rename from build_scripts/Debian+Ubuntu/data/64x64/apps/retroshare06.png rename to data/64x64/apps/retroshare06.png diff --git a/build_scripts/Debian+Ubuntu/data/retroshare06.desktop b/data/retroshare06.desktop similarity index 100% rename from build_scripts/Debian+Ubuntu/data/retroshare06.desktop rename to data/retroshare06.desktop diff --git a/build_scripts/Debian+Ubuntu/data/retroshare06.xpm b/data/retroshare06.xpm similarity index 100% rename from build_scripts/Debian+Ubuntu/data/retroshare06.xpm rename to data/retroshare06.xpm