Active Topics

 


Reply
Thread Tools
Zas's Avatar
Posts: 196 | Thanked: 113 times | Joined on Jun 2010 @ Finland
#71
No its ment to be "ar" not "tar". You need to install binutils package to get ar.
apt-get install binutils

If you enter "make-deb /home/user/package" the deb will be in /home/user.
 

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
#72
Ok, the file was created without errors: /home/user/foopackage_0.1.deb
But there are other problems:

First the file name is created with some strange characters like foopackage_ █0.1█.deb so i renamed with filebox (impossible to copy the file to pc with WinSCP).

Then i click to install and it says installation failed foopackage█ (again with strange character) retry or cancel?
 
Zas's Avatar
Posts: 196 | Thanked: 113 times | Joined on Jun 2010 @ Finland
#73
That character comes from you control file. It reads the "Versio: 0.1" line from there, same for the package name. The file formatting of your control file might not be right. Check if there are any trailing "invisible" characters on the "Package:" and "Version:" lines.

Then try building the deb again.
 

The Following User Says Thank You to Zas For This Useful Post:
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#74
i make the control file with notepad save it in ANSI code

Maybe i have to save it in Unicode or something different?
 
Zas's Avatar
Posts: 196 | Thanked: 113 times | Joined on Jun 2010 @ Finland
#75
I think your files don't use unix newlines.
Convert the control file:
Code:
tr -d '\r' < /home/user/foopackage/DEBIAN/control > /home/user/foopackage/DEBIAN/controltmp
mv /home/user/foopackage/DEBIAN/controltmp /home/user/foopackage/DEBIAN/control
 

The Following User Says Thank You to Zas For This Useful Post:
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#76
Originally Posted by Zas View Post
I think your files don't use unix newlines.
Convert the control file:
Code:
tr -d '\r' < /home/user/foopackage/DEBIAN/control > /home/user/foopackage/DEBIAN/controltmp
mv /home/user/foopackage/DEBIAN/controltmp /home/user/foopackage/DEBIAN/control
Success! Finally!

Thanks for your patience buddy!

The last thing: How do i translate that characters in windows like you did with "tr -d '\r'"
 
Zas's Avatar
Posts: 196 | Thanked: 113 times | Joined on Jun 2010 @ Finland
#77
I don't know how you would do that in windows but you can save this modified script as make-deb to automatically convert the characters:
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`

#convert from crlf to lf
tr -d '\r' < DEBIAN/control > controltmp
mv controltmp DEBIAN/control

#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
 

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
#78
Oh i see now, with tr command you delete the "enters" from the file

instead of
Name: blahblah
Version: blahblah

you replace it with
Name: blahblaVersion: blahbla
 
flotron's Avatar
Posts: 418 | Thanked: 506 times | Joined on Jan 2012 @ Argentina
#79
thank you again Zas
 
Zas's Avatar
Posts: 196 | Thanked: 113 times | Joined on Jun 2010 @ Finland
#80
It should delete duplicate enters that windows makes "\r\n" to "\n".

Also if you want to add an icon to your package (seen in package managers like hildon application manager and harmattan installui)

To add an icon install openssl "apt-get install openssl" and convert the icon png to base64:
Code:
openssl base64 -in /home/user/MyDocs/fooicon.png | sed 's/^/ /'
copy the output to control file under "Maemo-Icon-26":

Package: The-Amazing-Foo-Theme
Name: The Amazing Foo Theme
Version: 0.1
Architecture: armel
Description: Foo makes your dreams come true!* *Dreams not included. :P
Maintainer: ammyt <ammyt1@hotmail.com>
Author: ammyt <ammyt1@hotmail.com>
Section: user/Utilities+
Maemo-Icon-26:
fV19YXN9YXNbYTBkc2ZnW30koyR9dDM0MHRxMzI0XTQzMzQ5MD UxQCSjNWMwMjk0ZjV9QDQzXUB9
XaOAZjGjOTUxISI1QDJkOTM1MjQzNV0yMzV1ZDEyNDM15WRdYX dyZV0yMzQ5MDUxQCSjNWMwMjk0
ZjV9QDQzXUB9XaOAZjGjOTUxISI1QDJkOTM1MjQzNV0yMzV1ZD EyNDM15WQwQH1dYXdyZV0yMzQ5
MDUxQCSjNWMwMjk0ZjV9QDQzXUB9XaOAZjGjOTUxISI1QDJkOT M1MjQzNV0yMzV1ZDEyZDN9gEAh
IkQjISJEI0QjIjXlZDBAZDN9gEAhIkQjISJEI0QjIiEiJcVESU TFPUkhIkQjxSU9SWQxMjM1MOU0
MEBkM32AQCEiRCMhIkQjRCMiISIlxURJRMU9SSEiRCPFJT1JZD EyMzUw5TQz5X1dfWFzfWFzW2Ew
ZHNmZ1t9JKMkfXQzNDB0cTMyNF19M+V9XX1hc31hc1thMGRzZm dbfSSjJH10MzQwdHEzMjRdfV1h
d3JlXTIhIiXFRElExT1JISJEI8UlPUlkMTIzNTDlNDPl

<empty line>
Make sure there is a space character before each base64 line!
 

The Following 2 Users Say Thank You to Zas For This Useful Post:
Reply


 
Forum Jump


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