TROL && tar $ogargs $tsortargs --no-recursion --mtime=@$build_date -c $tarformat -T $tmp_dir/control_list | gzip $zipargs > $tmp_dir/control.tar.gz ) rm $tmp_dir/file_list rm $tmp_dir/control_list echo "2.0" > $tmp_dir/debian-binary if [ $opkext -eq 1 ]; then pkg_file=$dest_dir/${pkg}_${version}_${arch}.opk else pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk fi rm -f $pkg_file if [ "$outer" = "ar" ] ; then ( cd $tmp_dir && ar -crfD $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) else ( cd $tmp_dir && tar -c $tsortargs --mtime=@$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file ) fi rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz rmdir $tmp_dir echo "Packaged contents of $pkg_dir into $pkg_file" exit 0 : <<=cut =head1 DESCRIPTION B<opkg-build> creates an opkg package from a filesystem tree stored in I<pkg_directory>. I<pkg_directory> must have a B<CONTROL> directory, which contains the control information files, including the control file itself. This directory will I<not> appear in the binary package's filesystem archive, but instead the files in it will be put in the binary package's control information area. B<opkg-build> will read B<CONTROL/control> file and parse it. It will check it for syntax errors and other problems, and it will stop if it finds any. If no I<destination_directory> is specified, B<opkg-build> will write the package into a file in the current directory. The name of the package file will be I<package>B<_>I<version>B<_>I<arch>B<.ipk>. If the archive to be created already exists, it will be overwritten. =head1 OPTIONS A summary of options is included below. =over =item B<-c> Generate a binary package in an older B<tar> format. =item B<-C> Stop with an error if any files ending with B<~> are found. The default behaviour is to remove such files. =item B<-Z> I<compressor> Specify which compression type to use when building a package. Allowed values are B<gzip>, B<pigz>, B<bzip2>, B<lz4> and B<xz> (default is B<gzip>). =item B<-a> I<compressor-args> Specify the arguments used by the compressor. Overrides the default values. =item B<-O> Use B<.opk> extension. By default, B<.ipk> is used. =item B<-o> I<owner> Force I<owner> as the owner of all files in the package. =item B<-g> I<group> Force I<group> as the group of all files in the package. =back =head1 FILES B<opkg-build> creates a temporary directory named B<IPKG_BUILD.>I<$$> in the destination directory (where I<$$> stands for the PID of the running B<opkg-build>). There currently isn't a way to override this. For compatibility with Debian's B<dpkg-deb>, the directory with control files can also be named B<DEBIAN>. If both B<DEBIAN> and B<CONTROL> directories present, B<CONTROL> takes the precedence. =head1 AUTHORS This manual page was written by Andrew Shadura based on the manual page of B<dpkg-deb>. =cut