[iPhone]Cydiaに登録するdebパッケージを作る手順(最低限版)
ほとんどのちなさんに対する私信ですが。
gtxtEditJplusを例に取って、Cydia用のdebパッケージの作り方の手記を置いときます。
のちなさんの母艦はWindowsとのことなので、iPhone/iPod touch上で作業するという前提の説明です。
Packagesファイルの作り方を含む完全な情報はSaurik氏のページのこちらに。
自分のやり方は、かなりはしょっているので念のため。
How to Host a Cydia Repository
まずは、動くアプリケーションを作る。
iPhone/iPod touch(以下iPhoneとする)にrootユーザとしてSSHでログインし、/var/root/に掘ったaptディレクトリへ移動して、パッケージの名前になるディレクトリ、com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-armを掘る。
# cd # mkdir apt # cd apt # mkdir com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm
com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm内に移動して、インストールする必要のあるファイルをルートからの構造を再現するようにコピーする。
# cd com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm # mkdir Applications # cp -r /Applications/gTxtEditJplus.app/ Applications/
母艦がMacの場合は、.DS_Storeを掃除しておく。(下記はカレントディレクトリ以下にある.DS_Storeを再帰的に削除)
# find . -name .DS_Store -print -exec rm {} ";"
必要なパーミッションが外れてたら付けておく。
# cd Applications/gTxtEditJplus.app/ # ls -l total 80 -rw-r--r-- 1 root wheel 877 Sep 28 19:38 Info.plist -rwxr-xr-x 1 root wheel 58048 Sep 28 19:38 gTxtEditJplus* -rwxr-xr-x 1 root wheel 60 Sep 28 19:38 gTxtEditJplus_exec* -rw-r--r-- 1 root wheel 10631 Sep 28 19:38 icon.png # chmod u+s gTxtEditJplus gTxtEditJplus_exec # ls -l total 80 -rw-r--r-- 1 root wheel 877 Sep 28 19:38 Info.plist -rwsr-xr-x 1 root wheel 58048 Sep 28 19:38 gTxtEditJplus* -rwsr-xr-x 1 root wheel 60 Sep 28 19:38 gTxtEditJplus_exec* -rw-r--r-- 1 root wheel 10631 Sep 28 19:38 icon.png
com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm直下にDEBIANディレクトリを掘る。
controlファイルを作る。
cd ../../ mkdir DEBIAN vi DEBIAN/control
内容はこんな感じ。
Package: com.gojohnnyboi.gtxteditjpuls Name: gTxtEditJplus Version: 0.9-1 Architecture: iphoneos-arm Description: Copy & paste oriented text editor for Japanese. Once copy text on this app, paste anywhere via Japanese input method. gTxtEditJplus enable you to... Paste from Safari, Paste to Safari with modified iCopy bookmarklet. Make new mail message from clipboard, and so on. For details, please visit the following website. Homepage: http://www.hamkumas.net/ipod/ Maintainer: moyashi <hitoriblog_NO_NO_SPAM@gmail.com> Author: nochina <nochina_NO_NO_SPAM@hamkumas.net> Section: System Depends: Conflicts:
Versionは、「アプリケーションのバージョン番号-パッケージのバージョン番号」と付ける。
パッケージをやり直したら「0.9-2」などとなっていく。
Descriptionの2行目以降は行頭にスペースを入れる。
Dependsにインストールを前提にしたいパッケージ名をカンマ区切りで書いておくと、もしインストールされていなかった場合に事前にインストールをしてくれる。
同時に存在できないパッケージがあるならば、項目Conflictsにパッケージ名を書いておくと警告が出て、トラブルを回避できる。
Name, Author, HomepageはCydia独自の項目。
ゴミが出来てたら消しておく。
# ls DEBIAN control control~ # rm DEBIAN/control~
com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-armのあるディレクトリに移動して、パッケージ作成。
この際、tab補完すると、末尾に「dpkg-deb -b com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm/」といった感じで「/」が入るので、これは削除して実行。
非標準の項目(Name, Author, Homepage)が交じっているという内容のWarningが出るが無視。
# cd .. # dpkg-deb -b com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm # ls com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm/ com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm.deb
debパッケージが出来ているはずなので、既にアプリケーションがあれば削除して、インストールテストする。
手動でインストールしていた場合。
# rm -rf /Applications/gTxtEditJplus.app
前回もdebパッケージから入れていた場合。
controlに書いた「Package: com.gojohnnyboi.gtxteditjpuls」が識別子になる。
# apt-get remove com.gojohnnyboi.gtxteditjpuls
SpringBoardのキャッシュをリフレッシュして、respring。
# su mobile $ uicache $ restart $ exit
パッケージのインストールテスト。
# dpkg -i com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm.deb # su mobile $ uicache $ restart
これで正常にインストールされていればdebパッケージの完成。
その他の知識
debパッケージの解凍方法。
-xでインストールするファイルの解凍、-eで管理ファイルの解凍。
# mkdir temp # dpkg-deb -x com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm.deb temp # dpkg-deb -e com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm.deb temp
今回題材にしたdebパッケージへの直リン
http://homepage3.nifty.com/moyashi/cydia/com.gojohnnyboi.gtxteditjpuls_0.9-1_darwin-arm.deb
« [iPhone]コピー&ペースト機能搭載テキストエディタgTxtEditJplus | Main | [iPhone][Jailbreak]iPhoneでrlToday!? Lock Screenに任意の文字や画像を表示する »
The comments to this entry are closed.


Comments
おお!わかりやすいです!やってみます。
Posted by: のちな | 2008.09.28 at 09:05 PM
もやしさんのブログを RSS で読みたいのですが、ブログに RSS をつけていたくことは可能でしょうか?もしくはすでに公開されていますか?
Posted by: さし | 2008.09.30 at 05:57 PM
分かりにくいながらもサイドバーにリンクがありますが、以下となります。
feed://moyashi.air-nifty.com/hitori/atom.xml
Posted by: moyashi | 2008.09.30 at 06:07 PM
Hi moyashi-san. My name is Leandro, and I live in Japan. I just bought my iphone, but I like put in my iphone sources, repositores japaneses. You know anyone? I put your, found in google, but I like more. You can help me? Sorry, I know here is not place for ask this, but I can't read japanese. Sorry for this, and sorry my bad english too. If you know more cydia japanese repositores, or good repositores, please send for me? Thanks a lot
Posted by: Leandro | 2008.10.02 at 11:07 AM
Hi moyashi-san. My name is Leandro, and I live in Japan. I just bought my iphone, but I like put in my iphone sources, repositores japaneses. You know anyone? I put your, found in google, but I like more. You can help me? Sorry, I know here is not place for ask this, but I can't read japanese. Sorry for this, and sorry my bad english too. If you know more cydia japanese repositores, or good repositores, please send for me? Thanks a lot
Posted by: Leandro | 2008.10.02 at 11:07 AM
Hi Leandro,
Sorry, I don't know very much about repository in Japan.
I know only two repositories.
One is mine, the other is shown below:
http://www.ipod-repository.net
(Ready for Installer.app 4)
AFAIK, Repositories for Jailbroken iPhone are very rare in Japan.
Hardly anyone uses Open SDK.
I thought It is arise from moral value and language issue of Japanese.
Posted by: moyashi | 2008.10.03 at 04:33 AM
make it mineで=softbankという様に変更したいのですがsoftbankのロゴはどのように入力すれば変更可能でしょうか?
すでに方法は公開されていますか?
Posted by: | 2010.06.01 at 05:52 PM