{"id":2060,"date":"2013-09-25T16:00:12","date_gmt":"2013-09-25T08:00:12","guid":{"rendered":"http:\/\/ellery.no-ip.info\/wp\/thinkingmore\/?p=2060"},"modified":"2013-09-25T16:12:31","modified_gmt":"2013-09-25T08:12:31","slug":"gedit-git-plugin-%e4%ba%8c%e4%b8%89%e4%ba%8b","status":"publish","type":"post","link":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/2013\/09\/gedit-git-plugin-%e4%ba%8c%e4%b8%89%e4%ba%8b\/","title":{"rendered":"gedit-git-plugin \u4e8c\u4e09\u4e8b"},"content":{"rendered":"<p>\u540c\u4e8b\u90fd\u7528 gedit \uff0c\u53ea\u6709\u6211\u662f\u7528 vim\u3002vim \u6709\u500b vim-gitgutter \u7684 plugin\uff0c\u53ef\u4ee5\u76f4\u63a5\u986f\u793a\u4f60\u76ee\u524d\u7684 code \u8ddf git repository \u88e1\u7684 code \u4e4b\u9593\u7684\u5dee\u7570\u9ede\uff0c\u7528 ]h \u6216 [h \u5c31\u53ef\u4ee5\u5feb\u901f\u641c\u5c0b\uff0c\u6211\u60f3 gedit \u61c9\u8a72\u4e5f\u6709\u3002\u627e\u4e86\u4e00\u4e0b\uff0c\u5c31\u627e\u5230\u9019\u500b <a title=\"gedit-git-plugin\" href=\"https:\/\/github.com\/nacho\/gedit-git-plugin\" target=\"_blank\">gedit-git-plugin<\/a> \u3002<\/p>\n<p>\u5b89\u88dd\u9019\u500b plugin \u76f8\u7576\u7c21\u55ae\uff0c\u4f9d\u7167\u8aaa\u660e\u53bb\u505a\uff0c\u5f88\u5feb\u5c31\u53ef\u4ee5\u88dd\u597d\uff0c\u4f46\u662f\u5b89\u88dd\u4ed6\u80cc\u5f8c\u6240\u4f9d\u8cf4\u7684 library \u5c31\u7a0d\u5acc\u9ebb\u7169\u4e86\u3002\u4ed6\u6240\u9700\u8981\u7684 library \u6709 libgit2, libgit2-glib\u3002libgit2 \u6709\u4eba\u5df2\u7d93\u5305\u597d\u5728 ppa\uff0c\u53ea\u8981 sudo add-apt-repository ppa:pressureman\/ppa \u518d sudo apt-get update &amp;&amp; sudo apt-get install libgit2 \u5373\u53ef\u3002libgit2-glib \u6c92\u6709\u4eba\u5305\uff0c\u53ea\u80fd\u81ea\u5df1\u5305\uff0c\u65bc\u662f\u5c31\u53c8\u91cd\u7df4\u4e86\u4e00\u6b21\u6253\u5305 debian packages\uff0c\u771f\u7684\u592a\u4e45\u6c92\u5305\u6703\u5fd8\u8a18\u3002\u5927\u81f4\u5217\u4e00\u4e0b\u6b65\u9a5f\uff0c\u4e0b\u6b21\u53ef\u4ee5\u5feb\u901f\u7684\u56de\u61b6\u8d77\u4f86\u3002<\/p>\n<ol>\n<li>\u7528 git \u628a <a title=\"libgit2-glib\" href=\"https:\/\/github.com\/GNOME\/libgit2-glib\" target=\"_blank\">libgit2-glib<\/a> clone \u4e0b\u4f86\uff0c\u8f38\u5165\u6307\u4ee4\u58d3\u7e2e\u70ba tarball\uff1agit archive &#8211;prefix=libgit2-glib-0.0.6\/ &#8211;format=tar master | gzip &gt; ..\/libgit2-glib-0.0.6.tar.gz<\/li>\n<li>\u5230\u4e0a\u4e00\u5c64\u76ee\u9304\u4e4b\u5f8c\uff0c\u89e3\u58d3\u7e2e\uff0c\u7167\u7406\u6703\u89e3\u958b\u5230 libgit2-glib-0.0.6 \uff0c\u63a5\u8457\u5207\u5230\u8a72\u76ee\u9304\u4e0b\u3002<\/li>\n<li>\u7528 dh_make -f ..\/libgit2-glib-0.0.6.tar.gz \u7522\u751f debian \u76ee\u9304\u3002<\/li>\n<li>\u4fee\u6539 debian\/control\uff1a\u9019\u88e1\u8981\u4fee\u6539\u7684\u91cd\u9ede\u6709 Depends\u3001Homepage\u3001Description\u3001Package name<\/li>\n<li>\u4fee\u6539 debian\/changelog\uff1a\u9019\u908a\u5c31\u662f\u52a0\u4e0a\u8b8a\u66f4\u7684\u8aaa\u660e\uff0c\u8abf\u6574\u540d\u7a31\u7b49\u7b49\u7684\uff0c\u5982\u679c\u8981\u4e0a\u50b3\u5230 ppa\uff0c\u90a3\u500b unstable \u8981\u6539\u70ba ubuntu \u6b3d\u5b9a\u7684\u540d\u7a31\uff0c\u50cf\u662f precise\u3001raring \u7b49\u7b49\u7684\u3002\u8a18\u5f97\u6709 dch \u6307\u4ee4\u53ef\u4ee5\u505a\u7de8\u4fee\uff0c\u7528\u7de8\u8f2f\u5668\u662f\u6bd4\u8f03\u5feb\u3002<\/li>\n<li>\u4fee\u6539 debian\/rules\uff1a\u5167\u5bb9\u51fa\u4e4e\u610f\u6599\u7684\u7c21\u55ae\uff0c\u5728\u4fee\u6539\u6642\uff0c\u5247\u662f\u7528 override_ prefix \u53bb\u4fee\u4f60\u60f3\u8abf\u6574\u7684 target\u3002\u4f8b\u5982\uff1a\u60f3\u6539\u5b89\u88dd\u5730\u9ede\uff0c\u5c31\u7528\n<pre>override_dh_install:\r\n    $(MAKE) DESTDIR=$(PWD)\/debian\/tmp install<\/pre>\n<p>\u60f3\u8abf\u6574 configure\uff0c\u5c31\u7528<\/p>\n<pre>override_dh_auto_configure:\r\n    dh_auto_configure -- --enable-python=yes<\/pre>\n<p>\u60f3\u5ffd\u7565\u81ea\u52d5\u6e2c\u8a66\uff0c\u5c31\u7528<\/p>\n<pre>override_dh_auto_test-indep:<\/pre>\n<p>\u9019\u6a23\u5b50\uff0c\u9019\u4e5f\u662f\u624b\u518a\u4e0a\u5efa\u8b70\u7684\u4f5c\u6cd5\u3002<\/li>\n<li>\u5b89\u88dd\u76f8\u95dc\u7684\u5957\u4ef6\uff1apython-gi-dev\u3001python3.2-dev\u3001libgirepository1.0-dev\u3001libgio2.0-cil-dev\u3001libgit2-dev\u3001gobject-introspection\u3002<\/li>\n<li>\u597d\u4e86\u5c31\u53ef\u4ee5\u7528 dpkg-buildpackages -b \u4f86\u5efa\u7acb debian package \u4e86\u3002<\/li>\n<\/ol>\n<p>\u5efa\u7acb\u5b8c\u4e4b\u5f8c\uff0c\u628a\u8a72\u88dd\u7684\u90fd\u88dd\u597d\uff0c\u767c\u73fe gedit plugin \u9084\u662f\u4e0d\u80fd\u7528\uff0c\u8aaa\u627e\u4e0d\u5230 python3\u3002<\/p>\n<p>\u7d50\u8ad6\u662f\uff0c\u9019\u662f\u4e00\u7bc7\u7528\u4f86\u56de\u61b6\u6253\u5305 debian package \u7684\u6587\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u53c3\u8003\u8cc7\u6599\uff1a<\/p>\n<ul>\n<li><a title=\"Debian \u65b0\u7dad\u8b77\u4eba\u54e1\u624b\u518a\" href=\"http:\/\/www.debian.org\/doc\/manuals\/maint-guide\/index.zh-tw.html\" target=\"_blank\">Debian \u65b0\u7dad\u8b77\u4eba\u54e1\u624b\u518a<\/a><\/li>\n<li><a href=\"http:\/\/www.debian.org\/doc\/manuals\/maint-guide\/build.en.html\" target=\"_blank\">Building the package<\/a><\/li>\n<li><a title=\"\u4ee5Thrift\u70ba\u4f8b - \u55ae\u4e00source\u6253\u5305\u591a\u500bDebian Package\" href=\"http:\/\/blog.gasol.tw\/2011\/04\/thrift-sourcedebian-package.html\" target=\"_blank\">\u4ee5Thrift\u70ba\u4f8b &#8211; \u55ae\u4e00source\u6253\u5305\u591a\u500bDebian Package<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u540c\u4e8b\u90fd\u7528 gedit \uff0c\u53ea\u6709\u6211\u662f\u7528 vim\u3002vim \u6709\u500b vim-gitgutter \u7684 plugin\uff0c\u53ef\u4ee5\u76f4\u63a5\u986f\u793a\u4f60\u76ee\u524d\u7684 code \u8ddf git repository \u88e1\u7684 code \u4e4b\u9593\u7684\u5dee\u7570\u9ede\uff0c\u7528 ]h \u6216 [h \u5c31\u53ef\u4ee5\u5feb\u901f\u641c\u5c0b\uff0c\u6211\u60f3 gedit \u61c9\u8a72\u4e5f\u6709\u3002\u627e\u4e86\u4e00\u4e0b\uff0c\u5c31\u627e\u5230\u9019\u500b gedit-git-plugin \u3002 \u5b89\u88dd\u9019\u500b plugin \u76f8\u7576\u7c21\u55ae\uff0c\u4f9d\u7167\u8aaa\u660e\u53bb\u505a\uff0c\u5f88\u5feb\u5c31\u53ef\u4ee5\u88dd\u597d\uff0c\u4f46\u662f\u5b89\u88dd\u4ed6\u80cc\u5f8c\u6240\u4f9d\u8cf4\u7684 library \u5c31\u7a0d\u5acc\u9ebb\u7169\u4e86\u3002\u4ed6\u6240\u9700\u8981\u7684 library \u6709 libgit2, libgit2-glib\u3002libgit2 \u6709\u4eba\u5df2\u7d93\u5305\u597d\u5728 ppa\uff0c\u53ea\u8981 sudo add-apt-repository ppa:pressureman\/ppa \u518d sudo apt-get update &amp;&amp; sudo apt-get install libgit2 \u5373\u53ef\u3002libgit2-glib \u6c92\u6709\u4eba\u5305\uff0c\u53ea\u80fd\u81ea\u5df1\u5305\uff0c\u65bc\u662f\u5c31\u53c8\u91cd\u7df4\u4e86\u4e00\u6b21\u6253\u5305 debian packages\uff0c\u771f\u7684\u592a\u4e45\u6c92\u5305\u6703\u5fd8\u8a18\u3002\u5927\u81f4\u5217\u4e00\u4e0b\u6b65\u9a5f\uff0c\u4e0b\u6b21\u53ef\u4ee5\u5feb\u901f\u7684\u56de\u61b6\u8d77\u4f86\u3002 \u7528 git \u628a libgit2-glib clone &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/2013\/09\/gedit-git-plugin-%e4%ba%8c%e4%b8%89%e4%ba%8b\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;gedit-git-plugin \u4e8c\u4e09\u4e8b&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8],"tags":[31,32,33],"class_list":["post-2060","post","type-post","status-publish","format-standard","hentry","category-linux-","tag-gedit","tag-git","tag-python-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2MOxp-xe","_links":{"self":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts\/2060","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/comments?post=2060"}],"version-history":[{"count":0,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/posts\/2060\/revisions"}],"wp:attachment":[{"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/media?parent=2060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/categories?post=2060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ellery.no-ip.info\/wp\/thinkingmore\/wp-json\/wp\/v2\/tags?post=2060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}