diff --git a/build/build.linux.sh b/build/build.linux.sh index 55bc2f62..21280527 100755 --- a/build/build.linux.sh +++ b/build/build.linux.sh @@ -16,12 +16,13 @@ cd ../../ # 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/ +ln -sf ../../opt/sourcegit/sourcegit resources/deb/usr/bin 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/deb/DEBIAN/control b/build/resources/deb/DEBIAN/control index 44dbf397..7cfed330 100755 --- a/build/resources/deb/DEBIAN/control +++ b/build/resources/deb/DEBIAN/control @@ -1,5 +1,5 @@ Package: sourcegit -Version: 8.18 +Version: 8.23 Priority: optional Depends: libx11-6, libice6, libsm6 Architecture: amd64 diff --git a/build/resources/deb/DEBIAN/postinst b/build/resources/deb/DEBIAN/postinst deleted file mode 100755 index 56aba83b..00000000 --- a/build/resources/deb/DEBIAN/postinst +++ /dev/null @@ -1,5 +0,0 @@ -#!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 deleted file mode 100755 index 5a600118..00000000 --- a/build/resources/deb/DEBIAN/postrm +++ /dev/null @@ -1,4 +0,0 @@ -#!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 ddafcfb8..86a7cfdd 100644 --- a/build/resources/rpm/SPECS/build.spec +++ b/build/resources/rpm/SPECS/build.spec @@ -14,24 +14,23 @@ Requires: libSM.so.6 Open-source & Free Git Gui Client %install -mkdir -p $RPM_BUILD_ROOT/opt/sourcegit -mkdir -p $RPM_BUILD_ROOT/usr/share/applications -mkdir -p $RPM_BUILD_ROOT/usr/share/icons -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/opt/sourcegit -chmod 755 $RPM_BUILD_ROOT/usr/share/applications/sourcegit.desktop +mkdir -p %{buildroot}/opt/sourcegit +mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/usr/share/applications +mkdir -p %{buildroot}/usr/share/icons +cp -f ../../../SourceGit/* %{buildroot}/opt/sourcegit/ +ln -sf ../../opt/sourcegit/sourcegit %{buildroot}/%{_bindir} +cp -r ../../_common/applications %{buildroot}/%{_datadir} +cp -r ../../_common/icons %{buildroot}/%{_datadir} +chmod 755 -R %{buildroot}/opt/sourcegit +chmod 755 %{buildroot}/%{_datadir}/applications/sourcegit.desktop %files -/opt/sourcegit -/usr/share - -%post -ln -s /opt/sourcegit/sourcegit /usr/bin/sourcegit - -%postun -rm -f /usr/bin/sourcegit +%dir /opt/sourcegit/ +/opt/sourcegit/* +/usr/share/applications/sourcegit.desktop +/usr/share/icons/* +%{_bindir}/sourcegit %changelog -# skip \ No newline at end of file +# skip