Index: profile2.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/profile2/profile2.install,v
retrieving revision 1.1.2.9
diff -u -r1.1.2.9 profile2.install
--- profile2.install	9 May 2010 11:51:23 -0000	1.1.2.9
+++ profile2.install	14 May 2010 23:32:38 -0000
@@ -10,28 +10,51 @@
  * Implements hook_install().
  */
 function profile2_install() {
-  // Auto-create a field for the full name, if it doesn't exist yet.
-  if (!field_info_field('profile_fullname')) {
+  // Auto-create a field for the first name, if it doesn't exist yet.
+  if (!field_info_field('profile_firstname')) {
     $field = array(
-      'field_name' => 'profile_fullname',
+      'field_name' => 'profile_firstname',
       'type' => 'text',
       'cardinality' => 1,
       'translatable' => FALSE,
     );
     field_create_field($field);
   }
+  // Auto-create a field for the last name, if it doesn't exist yet.
+  if (!field_info_field('profile_lastname')) {
+    $field2 = array(
+      'field_name' => 'profile_lastname',
+      'type' => 'text',
+      'cardinality' => 1,
+      'translatable' => FALSE,
+    );
+    field_create_field($field2);
+  }  
   $instance = array(
     'entity_type' => 'profile',
-    'field_name' => 'profile_fullname',
+    'field_name' => 'profile_firstname',
     'bundle' => 'main',
-    'label' => 'Full name',
-    'description' => 'Specify your first and last name.',
+    'label' => 'First name',
+    'description' => 'Specify your first name.',
     'widget' => array(
       'type' => 'text_textfield',
       'weight' => 0,
     ),
   );
   field_create_instance($instance);
+  
+  $instance2 = array(
+    'entity_type' => 'profile',
+    'field_name' => 'profile_lastname',
+    'bundle' => 'main',
+    'label' => 'Last name',
+    'description' => 'Specify your last name.',
+    'widget' => array(
+      'type' => 'text_textfield',
+      'weight' => 0,
+    ),
+  );
+  field_create_instance($instance2);
 }
 
 /**
