如何打包我的 git repo 并发布到我的 launchpad ppa

如何打包我的 git repo 并发布到我的 launchpad ppa

我有一个名为记录器。这是一个 C++ 库。我要打包并发布到我的 launchpad ppa 的是

cd
rm -Rf Packages2
mkdir Packages2
cp -R workspace/logger/ Packages2/logger-1.0
cd Packages2/logger-1.0
rm -R build/
rm -R debian/
rm -R dist/
rm -R nbproject/
rm -R QtBuild/
rm -Rf .git
rm Makefile.old 
rm CMakeLists.txt.user

cd ~/Packages2/logger-1.0/
make clean
cd ..
rm -Rf logger-1.0.tar.gz logger_* logger logger-dev_* liblogger1_* logger1_* build-area/logger-1.0 build-area/logger_* build-area liblogger1_* build-area/logger-dev_* build-area/logger1*

tar -czf logger-1.0.tar.gz logger-1.0
bzr dh-make logger 1.0 logger-1.0.tar.gz
ly
cd logger/debian/
rm *ex *EX
cp ~/workspace/logger/debian/control ./
cp ~/workspace/logger/debian/changelog ./
cp ~/workspace/logger/debian/copyright ./
cp ~/workspace/logger/debian/rules ./
cp ~/workspace/logger/debian/README.Debian ./
cp ~/workspace/logger/debian/README.source ./
bzr commit -m "Initial commit of Debian packaging."
bzr builddeb -- -us -uc # -sd
bzr builddeb -S -- # -sd
bzr tag release-1.1
cd ../../build-area
pbuilder-dist xenial build logger_1.0-0ubuntu1.dsc
cd ../logger
bzr push lp:~satyagowtham-k-gmail/+junk/logger-package
cd ../build-area
dput ppa:satyagowtham-k-gmail/ferryfair.ppa logger_1.0-0ubuntu1_source.changes

现在我知道我们可以使用git而不是bzr。我发现有关打包和发布到 launchpad ppa 的文档非常少。我该如何完成?

答案1

其实很简单

cd ~/workspace/logger
git tag v1.0
git checkout -b ubuntu/xenial
mkdir debian
cd debian
vi changelog
vi control
vi rules
vi liblogger-dev.dirs
vi liblogger-dev.install
vi liblogger1.dirs
vi liblogger1.install
mkdir source
vi source/format
vi compat
cd ..
git add debian
git commit -a -m "packed from git"
# Check if full build works (so we don't upload a broken source package)
gbp buildpackage --git-upstream-tag='v1.0' --git-debian-branch=ubuntu/xenial
# Build source package
debuild -S -sa
# Upload source package to ppa
dput ppa:satyagowtham-k-gmail/ferryfair.ppa ../logger_1.0-0ubuntu1_source.changes

就这些。

相关内容