mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
build: refactor build scripts
use right way to include symlinks and some other minor changes
This commit is contained in:
parent
646f7f90cf
commit
6bea4b42a2
5 changed files with 19 additions and 28 deletions
|
@ -16,12 +16,13 @@ cd ../../
|
||||||
|
|
||||||
# Debain/Ubuntu package
|
# Debain/Ubuntu package
|
||||||
mkdir -p resources/deb/opt/sourcegit/
|
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/applications
|
||||||
mkdir -p resources/deb/usr/share/icons
|
mkdir -p resources/deb/usr/share/icons
|
||||||
cp -f SourceGit/* resources/deb/opt/sourcegit/
|
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/applications resources/deb/usr/share/
|
||||||
cp -r resources/_common/icons 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
|
sed -i "2s/.*/Version: ${version}/g" resources/deb/DEBIAN/control
|
||||||
dpkg-deb --build resources/deb ./sourcegit_${version}-1_amd64.deb
|
dpkg-deb --build resources/deb ./sourcegit_${version}-1_amd64.deb
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: sourcegit
|
Package: sourcegit
|
||||||
Version: 8.18
|
Version: 8.23
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Depends: libx11-6, libice6, libsm6
|
Depends: libx11-6, libice6, libsm6
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!bin/sh
|
|
||||||
|
|
||||||
echo 'Create link on /usr/bin'
|
|
||||||
ln -s /opt/sourcegit/sourcegit /usr/bin/sourcegit
|
|
||||||
exit 0
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!bin/sh
|
|
||||||
|
|
||||||
rm -f /usr/bin/sourcegit
|
|
||||||
exit 0
|
|
|
@ -14,24 +14,23 @@ Requires: libSM.so.6
|
||||||
Open-source & Free Git Gui Client
|
Open-source & Free Git Gui Client
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p $RPM_BUILD_ROOT/opt/sourcegit
|
mkdir -p %{buildroot}/opt/sourcegit
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
|
mkdir -p %{buildroot}/%{_bindir}
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/share/icons
|
mkdir -p %{buildroot}/usr/share/applications
|
||||||
cp -r ../../_common/applications $RPM_BUILD_ROOT/usr/share/
|
mkdir -p %{buildroot}/usr/share/icons
|
||||||
cp -r ../../_common/icons $RPM_BUILD_ROOT/usr/share/
|
cp -f ../../../SourceGit/* %{buildroot}/opt/sourcegit/
|
||||||
cp -f ../../../SourceGit/* $RPM_BUILD_ROOT/opt/sourcegit/
|
ln -sf ../../opt/sourcegit/sourcegit %{buildroot}/%{_bindir}
|
||||||
chmod 755 -R $RPM_BUILD_ROOT/opt/sourcegit
|
cp -r ../../_common/applications %{buildroot}/%{_datadir}
|
||||||
chmod 755 $RPM_BUILD_ROOT/usr/share/applications/sourcegit.desktop
|
cp -r ../../_common/icons %{buildroot}/%{_datadir}
|
||||||
|
chmod 755 -R %{buildroot}/opt/sourcegit
|
||||||
|
chmod 755 %{buildroot}/%{_datadir}/applications/sourcegit.desktop
|
||||||
|
|
||||||
%files
|
%files
|
||||||
/opt/sourcegit
|
%dir /opt/sourcegit/
|
||||||
/usr/share
|
/opt/sourcegit/*
|
||||||
|
/usr/share/applications/sourcegit.desktop
|
||||||
%post
|
/usr/share/icons/*
|
||||||
ln -s /opt/sourcegit/sourcegit /usr/bin/sourcegit
|
%{_bindir}/sourcegit
|
||||||
|
|
||||||
%postun
|
|
||||||
rm -f /usr/bin/sourcegit
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
# skip
|
# skip
|
Loading…
Reference in a new issue