This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
rpm_tools [2015/05/07 18:26] stephdl [git_mockbuild] |
rpm_tools [2019/06/05 19:48] (current) |
||
---|---|---|---|
Line 277: | Line 277: | ||
curl -u ' | curl -u ' | ||
mkdir -p ~/ | mkdir -p ~/ | ||
- | + | | |
cp -R smeserver-*/ | cp -R smeserver-*/ | ||
cp $1*.spec ~/ | cp $1*.spec ~/ | ||
cd ~/ | cd ~/ | ||
- | + | | |
if [ -e root/ | if [ -e root/ | ||
mkdir -p root/ | mkdir -p root/ | ||
Line 292: | Line 292: | ||
mv -f $1.ter.spec $1.spec | mv -f $1.ter.spec $1.spec | ||
rm -f $1.bis.spec | rm -f $1.bis.spec | ||
- | + | | |
- | + | ||
###git work | ###git work | ||
- | + | | |
if [ ! -e README.md ]; then | if [ ! -e README.md ]; then | ||
touch README.md | touch README.md | ||
echo "$1 is a contrib for SME Server, a Linux distro oriented server. see http:// | echo "$1 is a contrib for SME Server, a Linux distro oriented server. see http:// | ||
fi | fi | ||
- | + | | |
## | ## | ||
find * -type d -empty -exec touch {}/ | find * -type d -empty -exec touch {}/ | ||
- | + | | |
git init | git init | ||
git add . | git add . | ||
Line 310: | Line 310: | ||
git remote add origin git@github.com: | git remote add origin git@github.com: | ||
git push -u -f origin sme9 | git push -u -f origin sme9 | ||
- | + | | |
##find the apache authentication | ##find the apache authentication | ||
echo "" | echo "" | ||
Line 323: | Line 323: | ||
echo "no apache authentication" | echo "no apache authentication" | ||
fi | fi | ||
- | + | | |
## help to write the changelog | ## help to write the changelog | ||
myDate=$(LC_ALL=C date +"%a %b %d %Y") | myDate=$(LC_ALL=C date +"%a %b %d %Y") | ||
Line 329: | Line 329: | ||
echo "* $myDate stephane de Labrusse < | echo "* $myDate stephane de Labrusse < | ||
echo "- Initial release to sme9" | echo "- Initial release to sme9" | ||
- | + | | |
else | else | ||
echo"" | echo"" | ||
Line 357: | Line 357: | ||
exit | exit | ||
fi | fi | ||
- | + | | |
if [[ -d ~/ | if [[ -d ~/ | ||
echo"" | echo"" | ||
Line 368: | Line 368: | ||
fi | fi | ||
# Create needed dirs on the build box | # Create needed dirs on the build box | ||
- | + | | |
mkdir -p ~/ | mkdir -p ~/ | ||
mkdir -p ~/exchange | mkdir -p ~/exchange | ||
- | + | | |
rpm -ivh $1*.src.rpm | rpm -ivh $1*.src.rpm | ||
cd ~/ | cd ~/ | ||
rpmbuild -bp --nodeps $1*.spec | rpmbuild -bp --nodeps $1*.spec | ||
- | + | | |
##we remove all patch from the spec file | ##we remove all patch from the spec file | ||
sed '/ | sed '/ | ||
Line 381: | Line 381: | ||
mv -f $1.ter.spec $1.spec | mv -f $1.ter.spec $1.spec | ||
rm -f $1.bis.spec | rm -f $1.bis.spec | ||
- | + | | |
- | + | ||
###test to see if the directory already exists in ~/git_work, if yes we use ~/ | ###test to see if the directory already exists in ~/git_work, if yes we use ~/ | ||
if [[ ! -d ~/ | if [[ ! -d ~/ | ||
- | + | | |
gitexist=0 | gitexist=0 | ||
mkdir -p ~/ | mkdir -p ~/ | ||
NameGitHub=$1 | NameGitHub=$1 | ||
curl -u ' | curl -u ' | ||
- | + | | |
cp -R ~/ | cp -R ~/ | ||
cp ~/ | cp ~/ | ||
cd ~/ | cd ~/ | ||
- | + | | |
- | + | ||
elif [[ -d ~/ | elif [[ -d ~/ | ||
- | + | | |
gitexist=1 | gitexist=1 | ||
mkdir -p ~/ | mkdir -p ~/ | ||
NameGitHub=$1-sdl | NameGitHub=$1-sdl | ||
curl -u ' | curl -u ' | ||
- | + | | |
cp -R ~/ | cp -R ~/ | ||
cp ~/ | cp ~/ | ||
cd ~/ | cd ~/ | ||
- | + | | |
fi | fi | ||
| | ||
| | ||
###git work | ###git work | ||
- | + | | |
if [ ! -e README.md ]; then | if [ ! -e README.md ]; then | ||
touch README.md | touch README.md | ||
echo "$1 is a RPM for SME Server, a Linux distro oriented server. see http:// | echo "$1 is a RPM for SME Server, a Linux distro oriented server. see http:// | ||
fi | fi | ||
- | + | | |
## | ## | ||
find * -type d -empty -exec touch {}/ | find * -type d -empty -exec touch {}/ | ||
- | + | | |
git init | git init | ||
git add . | git add . | ||
git commit -m "first commit to SME Server" | git commit -m "first commit to SME Server" | ||
- | + | | |
if [[ $2 != ' | if [[ $2 != ' | ||
git co -b $2 | git co -b $2 | ||
Line 431: | Line 431: | ||
git remote add origin git@github.com: | git remote add origin git@github.com: | ||
git push -u -f origin $2 | git push -u -f origin $2 | ||
- | + | | |
elif [[ $gitexist = " | elif [[ $gitexist = " | ||
git remote add origin git@github.com: | git remote add origin git@github.com: | ||
git push -u -f origin $2 | git push -u -f origin $2 | ||
- | + | | |
fi | fi | ||
- | + | | |
- | + | ||
##find the apache authentication | ##find the apache authentication | ||
echo "" | echo "" | ||
Line 451: | Line 451: | ||
echo "no apache authentication" | echo "no apache authentication" | ||
fi | fi | ||
- | + | | |
## help to write the changelog | ## help to write the changelog | ||
myDate=$(LC_ALL=C date +"%a %b %d %Y") | myDate=$(LC_ALL=C date +"%a %b %d %Y") | ||
Line 459: | Line 459: | ||
| | ||
# a bit of clean | # a bit of clean | ||
- | + | | |
rm -rf ~/ | rm -rf ~/ | ||
| |