diff --git a/build/build.linux.sh b/build/build.linux.sh index ed819910..0432dcfe 100755 --- a/build/build.linux.sh +++ b/build/build.linux.sh @@ -17,12 +17,12 @@ rm -f SourceGit/sourcegit.icns # Debain/Ubuntu package mkdir -p resources/deb/opt/sourcegit/ -mkdir -p resources/deb/usr/bin mkdir -p resources/deb/usr/share/applications mkdir -p resources/deb/usr/share/icons cp -f SourceGit/* resources/deb/opt/sourcegit/ -cp -r resources/_common/usr resources/deb/ -chmod -R 755 resources/deb +cp -r resources/_common/applications resources/deb/usr/share/ +cp -r resources/_common/icons resources/deb/usr/share/ +chmod +x -R resources/deb/opt/sourcegit sed -i "2s/.*/Version: ${version}/g" resources/deb/DEBIAN/control dpkg-deb --build resources/deb ./sourcegit_${version}-1_amd64.deb diff --git a/build/resources/_common/usr/share/applications/sourcegit.desktop b/build/resources/_common/applications/sourcegit.desktop similarity index 100% rename from build/resources/_common/usr/share/applications/sourcegit.desktop rename to build/resources/_common/applications/sourcegit.desktop diff --git a/build/resources/_common/usr/share/icons/sourcegit.png b/build/resources/_common/icons/sourcegit.png similarity index 100% rename from build/resources/_common/usr/share/icons/sourcegit.png rename to build/resources/_common/icons/sourcegit.png diff --git a/build/resources/_common/usr/bin/sourcegit b/build/resources/_common/usr/bin/sourcegit deleted file mode 100644 index 74670167..00000000 --- a/build/resources/_common/usr/bin/sourcegit +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -exec /opt/sourcegit/sourcegit $1 diff --git a/build/resources/deb/DEBIAN/control b/build/resources/deb/DEBIAN/control old mode 100644 new mode 100755 index 33f0ab98..44dbf397 --- a/build/resources/deb/DEBIAN/control +++ b/build/resources/deb/DEBIAN/control @@ -1,5 +1,5 @@ Package: sourcegit -Version: 8.8 +Version: 8.18 Priority: optional Depends: libx11-6, libice6, libsm6 Architecture: amd64 diff --git a/build/resources/deb/DEBIAN/postinst b/build/resources/deb/DEBIAN/postinst new file mode 100755 index 00000000..56aba83b --- /dev/null +++ b/build/resources/deb/DEBIAN/postinst @@ -0,0 +1,5 @@ +#!bin/sh + +echo 'Create link on /usr/bin' +ln -s /opt/sourcegit/sourcegit /usr/bin/sourcegit +exit 0 \ No newline at end of file diff --git a/build/resources/deb/DEBIAN/postrm b/build/resources/deb/DEBIAN/postrm new file mode 100755 index 00000000..5a600118 --- /dev/null +++ b/build/resources/deb/DEBIAN/postrm @@ -0,0 +1,4 @@ +#!bin/sh + +rm -f /usr/bin/sourcegit +exit 0 \ No newline at end of file diff --git a/build/resources/rpm/SPECS/build.spec b/build/resources/rpm/SPECS/build.spec index 6025acac..ddafcfb8 100644 --- a/build/resources/rpm/SPECS/build.spec +++ b/build/resources/rpm/SPECS/build.spec @@ -15,17 +15,23 @@ Open-source & Free Git Gui Client %install mkdir -p $RPM_BUILD_ROOT/opt/sourcegit -mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/usr/share/applications mkdir -p $RPM_BUILD_ROOT/usr/share/icons -cp -r ../../_common/usr $RPM_BUILD_ROOT/ +cp -r ../../_common/applications $RPM_BUILD_ROOT/usr/share/ +cp -r ../../_common/icons $RPM_BUILD_ROOT/usr/share/ cp -f ../../../SourceGit/* $RPM_BUILD_ROOT/opt/sourcegit/ -chmod 755 -R $RPM_BUILD_ROOT +chmod 755 -R $RPM_BUILD_ROOT/opt/sourcegit +chmod 755 $RPM_BUILD_ROOT/usr/share/applications/sourcegit.desktop %files -/opt -%attr(555,root,root)/usr/bin +/opt/sourcegit /usr/share +%post +ln -s /opt/sourcegit/sourcegit /usr/bin/sourcegit + +%postun +rm -f /usr/bin/sourcegit + %changelog # skip \ No newline at end of file