Here is what has helped me with splitting large packages that contain a whole lot of files in them, as even careful manual moving can result in lost files. When used, scripting takes away human error.
It is assumed that you make install into "main", and "pkg" will be your regular non-development extension directory, and dev will be for the dev files. After "make install DESTDIR=/path/to/main", create the directories pkg and dev from the directory that "main" exists in. You should see with the ls command pkg, dev, and main in the directory you want to run the scripts. Here is the first script to seperate the dev files. Standard separation moves the *.h, *.a, *.pc, and *.la files into the -dev extension. Here is the script to be run from the main directory right above pkg, main, and dev:
First copy all the packages contents into pkg:
cp -a main/. pkg/
Then run the script
#!/bin/sh
cd pkg
for I in $(find `ls` -name *.h); do
export DIR=`dirname "$I"`;
[ -d ../dev/"$DIR" ] || mkdir -p ../dev/"$DIR";
mv "$I" ../dev/"$DIR"/;
done
for I in $(find `ls` -name *.a); do
export DIR=`dirname "$I"`;
[ -d ../dev/"$DIR" ] || mkdir -p ../dev/"$DIR";
mv "$I" ../dev/"$DIR"/;
done
for I in $(find `ls` -name *.la); do
export DIR=`dirname "$I"`;
[ -d ../dev/"$DIR" ] || mkdir -p ../dev/"$DIR";
mv "$I" ../dev/"$DIR"/;
done
for I in $(find `ls` -name *.pc); do
export DIR=`dirname "$I"`;
[ -d ../dev/"$DIR" ] || mkdir -p ../dev/"$DIR";
mv "$I" ../dev/"$DIR"/;
done
This will create the needed directories in the dev directory and move the pertinent files there. After that, you can check to make sure that all files made it into either the pkg or dev directory by running this script which checks against the main install directory:
#!/bin/sh
cd main # (or whatever your DESTDIR directory.)
for I in $(find `ls` -not -type d); do
[ -e ../pkg/"$I" ] || [ -e ../dev/"$I" ] || echo "$I" missing;
done
find . -type d | sort -r | xargs rmdir
If a file that is supposed to be in the extension is not in either pkg or dev directories, then the file will be echoed as missing.
This kind of thing would not be needed for most extensions, but when repackaging python with it's 2093 files this script made the job so much easier. Of course, you can pick and choose what type of files are to be moved, python took also the .pyc and .pyo filenames.