Reply
Thread Tools
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#61
Oh oh ok.. Son when he said
1. First thing is to copy the whole folder to /home/user:

The whole folder would mean /usr/share/themes/mytheme?
 
sifo's Avatar
Posts: 1,359 | Thanked: 1,292 times | Joined on Oct 2011 @ Tartus.Syria
#62
@flotron

your questions kind of hard you need to ask ammyt
sorry
__________________
[ 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
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#63
ok, i think is that

i will try what happens with the full directory path

Thank you sifo
 

The Following User Says Thank You to flotron For This Useful Post:
sifo's Avatar
Posts: 1,359 | Thanked: 1,292 times | Joined on Oct 2011 @ Tartus.Syria
#64
Originally Posted by flotron View Post
ok, i think is that

i will try what happens with the full directory path

Thank you sifo
you are welcome
__________________
[ 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
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#65
i'm getting error: tar: unrecongnized option '--format=gnu'
error 1
cant open /var/lib/apt/lists/lock open (13: permission denied)

and the deb file is made with 0 bytes

Last edited by flotron; 2012-06-26 at 19:14.
 
Zas's Avatar
Posts: 196 | Thanked: 113 times | Joined on Jun 2010 @ Finland
#66
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.
 

The Following 3 Users Say Thank You to Zas For This Useful Post:
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#67
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.
How i make this script a file? i paste this code inside a notepad and save it as make-deb.sh? or .conf?

Last edited by flotron; 2012-06-26 at 23:55.
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#68
anyway i save it as conf and it says /bin/sh: make-deb: not found
 
Zas's Avatar
Posts: 196 | Thanked: 113 times | Joined on Jun 2010 @ Finland
#69
Save it to MyDocs folder as make-deb.sh and then do this as root:
Code:
cp /home/user/MyDocs/make-deb.sh /usr/bin/make-deb
chmod +x /usr/bin/make-deb
Then you can use it.

Alternatively just save it in MyDocs as make-deb.sh and use it like "sh /home/user/MyDocs/make-deb.sh /home/user/foopackage"
 

The Following 2 Users Say Thank You to Zas For This Useful Post:
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#70
Ok, i just save it in MyDocs as make-deb.sh and use it like "sh /home/user/MyDocs/make-deb.sh /home/user/foopackage"

but i get error "line 52: ar: not found" i supose that you forgot the "t" there so i add it to the "ar" = tar (i dont know if this correct)

After fixing that i got: tar: invalid option - - ' r '

Using this, where is the deb file suposed to to be saved?

Thank you
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:59.