Reply
Thread Tools
sifo's Avatar
Posts: 1,359 | Thanked: 1,292 times | Joined on Oct 2011 @ Tartus.Syria
#91
on our N900 we have
Code:
dpkg-deb -e "file.deb"
to extract the control file from a debian file if you have this cmd on your N9 then you can
get an example control file from any deb for N9

Good luck

./sifo
__________________
[ N900-Crack ] [ The Purge ] [ New Smiles ] [ New icons ] [ ? ]
" Hey ! I've just met you and this is crazy, so install cssu maybe ? "
Please help out keeping Maemo.org alive, and consider donating.
https://www.facebook.com/ZoRk7
 

The Following User Says Thank You to sifo For This Useful Post:
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#92
Originally Posted by Zas View Post
I made a script for creating .debs because of that "unrecongnized option '--format=gnu'" error. This is what I use:
Code:
#!/bin/sh

#create .deb files for packages (fremantle&harmattan)

if [ ! $1 ];then
 echo Create .deb files for fremantle and harmattan devices
 echo Usage: make-deb /path/to/package
 exit 0
fi

#step in package directory
chdir "$1"

#versionnumber and packagename from control file
packagename=`grep "Package: " DEBIAN/control | cut -d ' ' -f 2`
versionnumber=`grep "Version: " DEBIAN/control | cut -d ' ' -f 2`

#remove old md5 and digsig sums
rm -f DEBIAN/md5sums 2>/dev/null
rm -f DEBIAN/digsigsums 2>/dev/null

#list all folders except DEBIAN
find | grep -v "./DEBIAN" > ../md5

#get md5 and digsig sums to DEBIAN/
while read line
do
 if [ -f "$line" ]; then
  #cut "./" from beginning
  line=`echo "$line" | cut -c 3-`

  #get md5
  md5sum "$line" >> DEBIAN/md5sums

  #get sha1 for digital signatures
  echo S 15 com.nokia.maemo H 40 `sha1sum "$line" | cut -c -40` R `expr length "$line"` $line >> DEBIAN/digsigsums
 fi
done < "../md5"

#remove temp file list
rm -f ../md5

#package control.tar.gz and data.tar.gz
tar -cvzf ../control.tar.gz -C DEBIAN/ . >/dev/null
tar -cvzf ../data.tar.gz . --exclude=DEBIAN >/dev/null
echo 2.0>../debian-binary

#step outside package folder
cd ..

#create debian archive "package_version.deb"
ar -rcv $packagename"_"$versionnumber.deb debian-binary control.tar.gz data.tar.gz >/dev/null

#remove packaged files
rm -f debian-binary control.tar.gz data.tar.gz 2>/dev/null
Save it as "make-deb" and execute "make-deb /home/user/foopackage" to create /home/user/The-Amazing-Foo_0.1.deb

It makes digsigsums and md5sums files needed for aegis and packages all files to package_version.deb, fetching package name and version number from control file.

It requires binutils for ar packaging, and harmattan packages have to be created on harmattan due to ar differencies.
Using these instructions from Zas, Im very close.

Only problem is I cannot make folder in /home/user/ and I cannot set chmod +x to package script.
 
sifo's Avatar
Posts: 1,359 | Thanked: 1,292 times | Joined on Oct 2011 @ Tartus.Syria
#93
Using these instructions from Zas, Im very close.
Good luck

Only problem is I cannot make folder in /home/user/ and I cannot set chmod +x to package script.
what is the errors maybe i can help
__________________
[ N900-Crack ] [ The Purge ] [ New Smiles ] [ New icons ] [ ? ]
" Hey ! I've just met you and this is crazy, so install cssu maybe ? "
Please help out keeping Maemo.org alive, and consider donating.
https://www.facebook.com/ZoRk7
 
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#94
I try to do both steps as root and ger operation not permitted,,,
 
sifo's Avatar
Posts: 1,359 | Thanked: 1,292 times | Joined on Oct 2011 @ Tartus.Syria
#95
sorry but now you need a N9/50 user to help you

Good luck
__________________
[ N900-Crack ] [ The Purge ] [ New Smiles ] [ New icons ] [ ? ]
" Hey ! I've just met you and this is crazy, so install cssu maybe ? "
Please help out keeping Maemo.org alive, and consider donating.
https://www.facebook.com/ZoRk7
 
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#96
Originally Posted by Estel View Post
peterleinchen, on my device, /usr/share/icons is just a symlink to /opt/usr/share/icons.
Is it true also for others, or I've kicked it there myself, and forget about doing so?
/Estel
Oh,
yes that is true. Did not dig deep enough into folder symlinking, so was not aware of optified icons folder. Nice. And thanks for pointing me.

So it is not really a big mess/problem/memory-consumption for my use case.
BUT, nevertheless I would like to know if there is another possibility to use other package's files within my own package?
Or do we have to clone each stuff?

Last edited by peterleinchen; 2012-07-29 at 12:00.
 
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#97
Originally Posted by Zas View Post
I made a script for creating .debs because of that "unrecongnized option '--format=gnu'" error. This is what I use:
Code:
#!/bin/sh

#create .deb files for packages (fremantle&harmattan)

if [ ! $1 ];then
 echo Create .deb files for fremantle and harmattan devices
 echo Usage: make-deb /path/to/package
 exit 0
fi

#step in package directory
chdir "$1"

#versionnumber and packagename from control file
packagename=`grep "Package: " DEBIAN/control | cut -d ' ' -f 2`
versionnumber=`grep "Version: " DEBIAN/control | cut -d ' ' -f 2`

#remove old md5 and digsig sums
rm -f DEBIAN/md5sums 2>/dev/null
rm -f DEBIAN/digsigsums 2>/dev/null

#list all folders except DEBIAN
find | grep -v "./DEBIAN" > ../md5

#get md5 and digsig sums to DEBIAN/
while read line
do
 if [ -f "$line" ]; then
  #cut "./" from beginning
  line=`echo "$line" | cut -c 3-`

  #get md5
  md5sum "$line" >> DEBIAN/md5sums

  #get sha1 for digital signatures
  echo S 15 com.nokia.maemo H 40 `sha1sum "$line" | cut -c -40` R `expr length "$line"` $line >> DEBIAN/digsigsums
 fi
done < "../md5"

#remove temp file list
rm -f ../md5

#package control.tar.gz and data.tar.gz
tar -cvzf ../control.tar.gz -C DEBIAN/ . >/dev/null
tar -cvzf ../data.tar.gz . --exclude=DEBIAN >/dev/null
echo 2.0>../debian-binary

#step outside package folder
cd ..

#create debian archive "package_version.deb"
ar -rcv $packagename"_"$versionnumber.deb debian-binary control.tar.gz data.tar.gz >/dev/null

#remove packaged files
rm -f debian-binary control.tar.gz data.tar.gz 2>/dev/null
Save it as "make-deb" and execute "make-deb /home/user/foopackage" to create /home/user/The-Amazing-Foo_0.1.deb

It makes digsigsums and md5sums files needed for aegis and packages all files to package_version.deb, fetching package name and version number from control file.

It requires binutils for ar packaging, and harmattan packages have to be created on harmattan due to ar differencies.
Im trying this on N9, but I cannot make DIR in /home/user/. No matter what I do I get "permission denied" error.

E: Trying it with files in MyDocs gives permission denied when running script.

Last edited by F2thaK; 2012-08-12 at 08:19.
 
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#98
Originally Posted by F2thaK View Post
Has ANYONE, got clear instructions of how to package a DEB on the N9?

Including exactly what you put in the control file?
The topic "Compiling & packaging on MeeGo Harmattan device" lists some ways to compile and/or package on device for MeeGo Harmattan.

To package on device : use Harmattan SDK image chrooted or PyPackager.

See many control files (for Harmattan SDK use) or make.py (for PyPackager use) in the source code of softwares in the Harmattan GitHub repository.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.
 

The Following User Says Thank You to rcolistete For This Useful Post:
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#99
I packaged a theme and it installs without problems in its own folder, ok thats done. But i want To know for ex. I modify some file in the base folder, but when i uninstall (the theme) i want that the base folder go back to previous state, i mean that if any file was edited or deleted in the deb installing process when uninstall restore all that.
How can i tell meego that remember that when someone uninstall restore those files previous state?
 
sifo's Avatar
Posts: 1,359 | Thanked: 1,292 times | Joined on Oct 2011 @ Tartus.Syria
#100
I believe you cant do that, unless you made a backup of the base folder and restore it manually after installing... ( i think it is possible with a script to restore the backup after uninstalling ).

lol ! you are not editing a text file [ctrl + z] is not allowed
__________________
[ N900-Crack ] [ The Purge ] [ New Smiles ] [ New icons ] [ ? ]
" Hey ! I've just met you and this is crazy, so install cssu maybe ? "
Please help out keeping Maemo.org alive, and consider donating.
https://www.facebook.com/ZoRk7

Last edited by sifo; 2012-08-24 at 04:54.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:07.